aws-sts
TLDR
Get the identity of the current caller
SYNOPSIS
aws sts subcommand [options]
DESCRIPTION
aws sts is the AWS CLI interface for AWS Security Token Service (STS), which enables you to request temporary, limited-privilege credentials for IAM users or federated users.
STS is essential for cross-account access, identity federation, and implementing least-privilege security. Temporary credentials include an access key, secret key, and session token with configurable expiration.
PARAMETERS
--role-arn value
The ARN of the role to assume--role-session-name value
An identifier for the assumed role session--duration-seconds value
Duration of the temporary credentials (900-43200 seconds)--serial-number value
The ARN of the MFA device for MFA-protected operations--token-code value
The value from the MFA device--external-id value
A unique identifier for cross-account access
SUBCOMMANDS
Identity
get-caller-identity, get-access-key-infoRole Assumption
assume-role, assume-role-with-saml, assume-role-with-web-identity, assume-rootTemporary Credentials
get-session-token, get-federation-tokenFederation
get-web-identity-token, get-delegated-access-tokenTroubleshooting
decode-authorization-message
CAVEATS
Temporary credentials have a maximum duration of 12 hours for role assumption (1 hour default). MFA-protected role assumptions require both --serial-number and --token-code. Chained role assumptions (assuming a role from an assumed role) have a maximum duration of 1 hour.
HISTORY
AWS STS has been available since the launch of IAM in May 2011, enabling temporary security credentials for AWS services. It has expanded to support web identity federation, SAML 2.0, and various assume-role scenarios.


