情報がある場所
$ cat /Users/<UserName>/.aws/credentials
[master]
aws_access_key_id = aa
aws_secret_access_key = aa
[terraform]
aws_access_key_id = bb
aws_secret_access_key = bb
$ cat /Users/<UserName>/.aws/config
[profile aaa-sso]
sso_session = aws_cli
sso_account_id = aaa
sso_role_name = AWSAdministratorAccess
region = ap-northeast-1
[sso-session aws_cli]
sso_start_url = https://d-aaa.awsapps.com/start
sso_region = ap-northeast-1
sso_registration_scopes = sso:account:access
[profile aaa]
source_profile = master
mfa_serial = arn:aws:iam::aaa:mfa/mfa_aaa
role_arn = arn:aws:iam::aaa:role/aaa
region = ap-northeast-1
[profile terraform]
region = ap-northeast-1
output = json
新規でクレデンシャル情報を増やす場合
- IAMユーザー作成する
- アクセスキーを作成する
- CLIで登録する
$ aws configure --profile <新しく作成する名前> AWS Access Key ID [None]: ccc AWS Secret Access Key [None]: ccc Default region name [None]: ap-northeast-1 Default output format [None]: json