3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SimpleDBをCLIで作成・削除

Posted at

SimpleDBの操作メモ

準備

  • aws cliが導入済み
  • ~/.aws/credentials にPROFILEを記載

CLIの設定

最初にhelpを見ようとしたところsdbが有効になっていなかったらしく設定を変更。
Preview serviceのデフォルト設定なのかは不明(テスト環境ではaws-cli/1.8.3を使用)

% aws sdb help
This service is only available as a preview service.

However, if you'd like to use the "aws sdb" commands with the
AWS CLI, you can enable this service by adding the following to your CLI
config file:

    [preview]
    sdb=true

or by running:

    aws configure set preview.sdb true

% aws configure set preview.sdb true

一覧の取得

% aws sdb list-domains --region REGION --profile PROFILE
{
    "DomainNames": [
        "simple_db_name"
    ]
}

作成

% aws sdb create-domain --domain-name sample_db_name --region REGION --profile PROFILE

削除

% aws sdb delete-domain --domain-name simple_db_name --region REGION --profile PROFILE

削除後の確認

% aws sdb list-domains --region REGION --profile PROFILE
{
    "DomainNames": []
}

感想とか

CLIから操作出来るのはかなり楽
(Consoleから削除出来ないし、SDKの導入も手がかかる為)
他のPreviewになっているCLIも同様にpreview trueにしないといけないのかも

参考URL

sdb — AWS CLI 1.10.32 Command Reference

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?