1
0

IAM Identity Centerで作ったユーザーにAWS CLIからアクセスする方法

Posted at

手順

  • セッションを立ち上げる
$ aws configure sso

aws access portal(IAM Identity Centerで作ったユーザーのログイン画面)に行けば、実行後の入力すべき値が確認可能。それに従って、入力していく。

  • 認証が終われば、プロファイル名を登録しておく
CLI profile name [{プロファイル名}]:

出てきたプロファイル名を登録する。

export AWS_PROFILE={プロファイル名}

これだけ。あとはコマンド叩く。

IAM Identity Centerの良さ

IAM Identity Centerで作ったIAMユーザーにcliからアクセスすると、そのタイミングでアクセスキーが発行される。「セッションが切れる or 一定の時間が経つ」とそのアクセスキーは自動で廃棄される。

普通のIAMで作ったユーザーにアクセスするのと違い、超短期的なアクセスキーの運用により、セキュリティを高められる。

1
0
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
1
0