aws sts assume-role
Returns a set of temporary security credentials that you can use to access Amazon Web Services resources. AWS CLI reference
13 options Its page in the AWS CLI reference
Options
--duration-secondsThe duration, in seconds, of the role session.--external-idA unique identifier that might be required when you assume a role in another account.--minimum-session-token-sizeThe minimum size, in bytes, of the session token that STS issues for the request.--policy-arnsThe Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies.--policyAn IAM policy in JSON format that you want to use as an inline session policy.--provided-contextsA list of previously acquired trusted context assertions in the format of a JSON array.--role-arnThe Amazon Resource Name (ARN) of the role to assume.--role-session-nameAn identifier for the assumed role session.--serial-numberThe identification number of the MFA device that is associated with the user who is making the AssumeRole call.--source-identityThe source identity specified by the principal that is calling the AssumeRole operation.--tagsA list of session tags that you want to pass.--token-codeThe value provided by the MFA device, if the trust policy of the role being assumed requires MFA.--transitive-tag-keysA list of keys for session tags that you want to set as transitive.