A quick question about using AWS CLI as IAM user or as a user in the Identity Centre.

0

Hello,

I have a quick question about the two types of users. I have configured my AWS CLI using the user created in the Identity Centre. While AWS documentation strongly recommends accessing the AWS CLI (https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html), there are a lot of tutorials configuring the AWS CLI as an IAM user.

I have two questions about this:

  1. Would there be any issues down the road if the AWS CLI is configured as an Identity centre user?
  2. If I have already configured the AWS CLI as an Identity centre user, is it possible to add an IAM user?

Appreciate your advice as always!

Lin

1回答
0
承認された回答

Hi Lin,

Current best practice is to use the AWS CLI in conjunction with AWS IAM Identity Center for workforce usage of AWS CLI . This allows you to obtain short-lived credentials and have the users logging in using the best practices including MFA if you have it set it up that way. You probably find many tutorials with IAM User usage because that option has been available for several years (10+) and used to be the standard, while the Identity Center integration with AWS CLI it's way more recent (3 years or so I believe) and it's the current best practice.

So to your questions;

  1. No, there is no long term problem, we prefer you using it with IAM Identity Center (with MFA if possible please!)
  2. While it's possible to have multiple configurations, you shouldn't require to use IAM Users with AWS CLI unless you have a specific use case which requires you to have a IAM User rather than a IAM Role. This could happen when you want to provide access to your environment to an application that lives outside of AWS (IE: A non-AWS third party wants to access your S3 bucket for some reason), as in any other case when apps are inside AWS, you can leverage IAM Roles to obtain access to your resources.

It seems you have set it up well, keep with it!

AWS
回答済み 3ヶ月前
profile pictureAWS
エキスパート
レビュー済み 3ヶ月前
  • Appreciate the fast response and useful info., Pablo!

    Lin

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ