13
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS CLIでアカウント切り替え

Last updated at Posted at 2018-09-23

AWS CLIを複数のアカウントで使い分ける場合。

参考にさせていただいた記事
https://qiita.com/ryuzee/items/e3ce493f132f1981f57a

作業

アカウントの設定

--profileのあとに登録したいアカウント名を指定する

$ aws configure --profile another-account
AWS Access Key ID [None]: [Access key ID]
AWS Secret Access Key [None]: [Secret access key]
Default region name [None]: ap-northeast-1
Default output format [None]: json

あとはコマンド実行時に--profileをつければOK

$ aws s3 ls --profile another-account
13
9
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
13
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?