4
2

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.

awscliでAWS_ACCOUNT_IDを確認

Last updated at Posted at 2017-01-23

今はこれで取れるらしい

$ aws sts get-caller-identity

{
    "Account": "xxxxxxxxx", 
    "UserId": "xxxxxxxxxxxxxxx", 
    "Arn": "arn:aws:iam::xxxxxxxx:user/katsut"
}

でもやってみたら最初エラーになった。
cliのバージョンを上げたら実行できた。

$ sudo pip install awscli --ignore-installed six
$ aws --version

aws-cli/1.11.33 Python/2.7.10 Darwin/15.6.0 botocore/1.4.90

kinesisのarnにaccountIdがついてしまうのでちょっと便利だった

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?