AWS CLI の profile を追加する

AWS CLI の profile を追加する:


結論

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 を編集するのは手間すぎる

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)