Obtain temporary credentials for another role.
Section: STS Identity and Sessions
Assume a role
bash
bash
aws sts assume-role --role-arn arn:aws:iam::123456789012:role/AdminRole --role-session-name admin-cliExplanation
Returns temporary access key, secret key, and session token values.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing STS Identity and Sessions