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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南