Configuration Management and IaC

Which AWS STS operation lets an authorized principal obtain temporary credentials for an IAM role in another account?

Show the answer

Correct answerC. AssumeRole

AWhy not this: GetSessionToken provides temporary credentials for an IAM user, not for a target cross-account role.

BWhy not this: GetFederationToken issues federated-user credentials rather than assuming a target IAM role.

CWhy this is right: AssumeRole returns temporary credentials for an authorized IAM role, including a role in another account.

DWhy not this: GetCallerIdentity returns information about the caller and does not issue credentials.

AssumeRole returns temporary security credentials for a role the caller is authorized to assume. GetSessionToken provides temporary credentials associated with the calling IAM user rather than assuming a target role.