AptlyStar

AWS STS

Connect to AWS Security Token Service

使用说明

Integrate AWS STS into the workflow. Assume roles, get temporary credentials, verify caller identity, and look up access key information.

工具

sts_assume_role

Assume an IAM role and receive temporary security credentials

输入

参数类型必填描述
regionstring是AWS region (e.g., us-east-1)
accessKeyIdstring是AWS access key ID
secretAccessKeystring是AWS secret access key
roleArnstring是ARN of the IAM role to assume
roleSessionNamestring是Identifier for the assumed role session
durationSecondsnumber否Duration of the session in seconds (900-43200, default 3600)
policystring否JSON IAM policy to further restrict session permissions (max 2048 chars)
externalIdstring否External ID for cross-account access
serialNumberstring否MFA device serial number or ARN
tokenCodestring否MFA token code (6 digits)

输出

参数类型描述
accessKeyIdstringTemporary access key ID
secretAccessKeystringTemporary secret access key
sessionTokenstringTemporary session token
expirationstringCredential expiration timestamp
assumedRoleArnstringARN of the assumed role
assumedRoleIdstringAssumed role ID with session name
packedPolicySizenumberPercentage of allowed policy size used
sourceIdentitystringSource identity set on the role session, if any

sts_get_caller_identity

Get details about the IAM user or role whose credentials are used to call the API

输入

参数类型必填描述
regionstring是AWS region (e.g., us-east-1)
accessKeyIdstring是AWS access key ID
secretAccessKeystring是AWS secret access key

输出

参数类型描述
accountstringAWS account ID
arnstringARN of the calling entity
userIdstringUnique identifier of the calling entity

sts_get_session_token

Get temporary security credentials for an IAM user, optionally with MFA

输入

参数类型必填描述
regionstring是AWS region (e.g., us-east-1)
accessKeyIdstring是AWS access key ID
secretAccessKeystring是AWS secret access key
durationSecondsnumber否Duration of the session in seconds (900-129600, default 43200)
serialNumberstring否MFA device serial number or ARN
tokenCodestring否MFA token code (6 digits)

输出

参数类型描述
accessKeyIdstringTemporary access key ID
secretAccessKeystringTemporary secret access key
sessionTokenstringTemporary session token
expirationstringCredential expiration timestamp

sts_get_access_key_info

Get the AWS account ID associated with an access key

输入

参数类型必填描述
regionstring是AWS region (e.g., us-east-1)
accessKeyIdstring是AWS access key ID
secretAccessKeystring是AWS secret access key
targetAccessKeyIdstring是The access key ID to look up

输出

参数类型描述
accountstringAWS account ID that owns the access key

On this page