10
2

More than 3 years have passed since last update.

aws sts get-caller-identityしたときにunknown output typeが表示されたはなし

Last updated at Posted at 2020-08-17

はじめに

aws sts get-caller-identityをしたらunknown output typeが表示されて、ちょっとはまったので忘れないようにメモ。

おきたこと

そもそもaws sts get-caller-identityをしようとしたら、間違えてaws configureをしてしまいました。(なぜかよくやっちゃう。)なので、いつも通りそのままEnter押していきます。

C:\>aws configure
AWS Access Key ID [******************ID]:
AWS Secret Access Key [*****************KEY]:
Default region name [ap-northeast-1]:
Default output format [JSON]:

そして、ようやくやりたかったコマンドを打ってみたらUnknown output typeと言われてしまいました。

C:\>aws sts get-caller-identity

Unknown output type: JSON

JSON であってるのにおかしいなと思いながら、とりあえずもう1回aws configureをして小文字の json に変更してみます。

C:\>aws configure
AWS Access Key ID [******************ID]:
AWS Secret Access Key [*****************KEY]:
Default region name [ap-northeast-1]:
Default output format [JSON]: json

できた。

C:\>aws sts get-caller-identity
{
    "UserId": "**********UserId",
    "Account": "*********Account",
    "Arn": "arn:aws:iam::**************:user/me"
}

おわりに

なるほど。小文字なのか。
(じゃあなんでこの前aws configureしたときは何も問題なかったんだろう…?)

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