Ask Your Question
1

Is it possible to execute a single command to assume an AWS STS role?

asked 2022-03-02 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-06-29 01:00:00 +0000

qstack gravatar image

Yes, it is possible to assume an AWS STS role with a single command using the AWS CLI. The command to assume a role is as follows:

aws sts assume-role --role-arn [ROLE ARN] --role-session-name [SESSION NAME]

You will need to replace [ROLE ARN] with the ARN of the role you want to assume and [SESSION NAME] with a descriptive name for the session. The command will return temporary security credentials that you can use to access AWS resources with the permissions granted by the assumed role.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-03-02 11:00:00 +0000

Seen: 13 times

Last updated: Jun 29 '22