LoginSignup
4
6

More than 5 years have passed since last update.

named profiles を使って aws-cli の複数の認証情報を管理する方法

Posted at

会社と個人用のプロファイルを分けたい場合などに

(おさらい)aws-cli で認証する方法

$ aws configure

プロファイルに名前を付けたい場合

$ aws configure --profile #{name}

プロファイルの一覧を確認したい場合

~/.aws に格納されているファイルを見る

$ cat ~/.aws/config

[default]
[profile name]
  • [default] は、 profile オプションを付けずに aws configure したプロファイル
$ cat ~/.aws/config

[default]
aws_secret_access_key = ....
aws_access_key_id = ....
[profile name]
....

デフォルトのプロファイルを設定したい場合

環境変数 AWS_DEFAULT_PROFILE にプロファイル名を設定する

参考

4
6
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
4
6