【AWS】複数環境でAWS CLIを使い分ける
- 他のprofileを設定する
aws configure --profile hoge
- 鍵とか聞かれるので入力する
$ 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
- profileを指定して実行する
aws cmd --profile hoge