aws sts get-caller-identity lists the root account i am unable to switch to iam user by using AWS CLI

0

aws sts get-caller-identity lists the root account i am unable to switch to iam user and i am not able to create cloudformation steps from this and perform the next steps

Shruthi
已提問 2 個月前檢視次數 136 次
2 個答案
3

Review Configure the AWS CLI for the settings that the AWS Command Line Interface (AWS CLI) uses to interact with AWS.

Some options to select the IAM user:

  • use the AWS CLI --profile parameter (see Using named profiles )
  • set the AWS_PROFILE environment variable as the default profile

Additionally, review Security best practices in IAM and look at using temporary credentials when accessing AWS through federation with an identity provider.

profile pictureAWS
已回答 2 個月前
profile picture
專家
已審閱 2 個月前
profile picture
專家
已審閱 2 個月前
1

Do you have aws credentials correctly configured? Typically is a good practice to assume role https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-cli.html so that you always work with temporary credentials

profile picture
專家
已回答 2 個月前
profile picture
專家
已審閱 2 個月前
profile picture
專家
已審閱 2 個月前

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

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

回答問題指南