LoginSignup
46
32

More than 5 years have passed since last update.

AWS CLI の profile を追加する

Last updated at Posted at 2018-10-11

結論

aws configure --profile sample みたいな感じで追加できる。

$ aws configure --profile sample
AWS Access Key ID [None]: XXXXXXXXXXXXXXXX
AWS Secret Access Key [None]: XXXXXXXXXXXXXXXX
Default region name [None]: ap-northeast-1
Default output format [None]: json

ドキュメント

名前付きプロファイル - AWS Command Line Interface
https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-multiple-profiles.html

追加のプロファイルを設定するには、--profile オプションで aws configure を使用するか、または、config と認証情報ファイルへエントリを追加します。

リファレンス

configure — AWS CLI 1.16.31 Command Reference
https://docs.aws.amazon.com/cli/latest/reference/configure/index.html

You can configure a named profile using the --profile argument.

所感

エディタで ~/.aws/credentials, ~/.aws/config を編集するのは手間すぎる

46
32
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
46
32