一键导入
awsclaw-sts
Get caller identity, assume roles, decode authorization messages, and get temporary credentials using the awsclaw VS Code extension STSTool.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Get caller identity, assume roles, decode authorization messages, and get temporary credentials using the awsclaw VS Code extension STSTool.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage and inspect AWS API Gateway REST APIs, resources, methods, stages, authorizers, usage plans, and domain names using the awsclaw VS Code extension APIGatewayTool.
Manage and inspect AWS CloudFormation stacks, resources, changesets, types, drift detection, and stack sets using the awsclaw VS Code extension CloudFormationTool.
Query and manage CloudWatch log groups, streams, events, run Insights queries, inspect metric filters and subscriptions, and open the interactive log viewer using awsclaw. Find logs from Lambda, API Gateway, Glue, RDS, ECS, Step Functions, and other AWS services.
Manage Amazon DynamoDB tables and items using awsclaw. Create/delete/update tables, query and scan data, CRUD operations on items, manage TTL, backups, global tables, auto-scaling, and tags.
Manage and query AWS EC2 resources including launching/stopping/terminating instances, creating VPCs and subnets, managing security groups, volumes, snapshots, AMIs, and querying all EC2 resource types using awsclaw. Full lifecycle management.
Manage and inspect AWS EMR clusters, steps, instances, studios, notebook executions, release labels, security configurations, and managed scaling using awsclaw. Supports full lifecycle operations.
| name | awsclaw-sts |
| description | Get caller identity, assume roles, decode authorization messages, and get temporary credentials using the awsclaw VS Code extension STSTool. |
Use the STSTool language tool in VS Code to manage AWS STS (Security Token Service) operations — identity verification, role assumption, temporary credentials, and authorization debugging.
Tool name: STSTool
{
"command": "<CommandName>",
"params": { ... }
}
| Command | Description |
|---|---|
| AssumeRole | Assume an IAM role and get temporary credentials |
| AssumeRoleWithSAML | Assume a role using a SAML assertion |
| AssumeRoleWithWebIdentity | Assume a role using a web identity (OIDC) token |
| DecodeAuthorizationMessage | Decode an encoded authorization failure message |
| GetAccessKeyInfo | Get the account ID for an access key |
| GetCallerIdentity | Get the identity of the calling credentials (account, ARN, user ID) |
| GetDelegatedAccessToken | Get a delegated access token |
| GetFederationToken | Get temporary credentials for a federated user |
| GetSessionToken | Get temporary session credentials (with optional MFA) |
| GetWebIdentityToken | Get a web identity token for a role |
| Parameter | Type | Description |
|---|---|---|
| RoleArn | string | IAM role ARN (Required by: AssumeRole, AssumeRoleWithSAML, AssumeRoleWithWebIdentity, GetDelegatedAccessToken, GetWebIdentityToken) |
| RoleSessionName | string | Session name for role assumption (Required by: AssumeRole, AssumeRoleWithWebIdentity, GetWebIdentityToken) |
| DurationSeconds | number | Token lifetime in seconds (Used by: AssumeRole, GetDelegatedAccessToken, GetFederationToken, GetSessionToken, GetWebIdentityToken) |
| ExternalId | string | External ID for cross-account role assumption (Used by: AssumeRole) |
| PolicyArns | array | Managed policy ARNs for session policies (Used by: AssumeRole, AssumeRoleWithWebIdentity, AssumeRoleWithSAML) |
| Policy | string | IAM policy JSON string for temporary credentials (Used by: AssumeRole, GetFederationToken) |
| TransitiveTagKeys | array | Session tag keys to set as transitive (Used by: AssumeRole) |
| SourceIdentity | string | Source identity for role chaining (Used by: AssumeRole) |
| Tags | array | Session tags as [{Key, Value}] (Used by: AssumeRole, GetFederationToken) |
| SAMLAssertion | string | Base64-encoded SAML authentication response (Required by: AssumeRoleWithSAML) |
| PrincipalArn | string | ARN of SAML provider (Required by: AssumeRoleWithSAML) |
| WebIdentityToken | string | Web identity (OIDC) token (Required by: AssumeRoleWithWebIdentity, GetWebIdentityToken) |
| ProviderId | string | Identity provider ID (Used by: AssumeRoleWithWebIdentity, GetWebIdentityToken) |
| EncodedMessage | string | Encoded authorization failure message (Required by: DecodeAuthorizationMessage) |
| AccessKeyId | string | AWS access key ID (Required by: GetAccessKeyInfo) |
| DelegationTokenLifetimeSeconds | number | Delegated token lifetime in seconds (Used by: GetDelegatedAccessToken) |
| Name | string | Session or federation token name (Required by: GetFederationToken) |
| SerialNumber | string | MFA device serial number (Used by: GetSessionToken) |
| TokenCode | string | MFA token code (Used by: GetSessionToken) |
{ "command": "GetCallerIdentity", "params": {} }
{ "command": "AssumeRole", "params": { "RoleArn": "arn:aws:iam::123456789012:role/MyRole", "RoleSessionName": "my-session", "DurationSeconds": 3600 } }
{ "command": "AssumeRole", "params": { "RoleArn": "arn:aws:iam::987654321098:role/CrossAccountRole", "RoleSessionName": "cross-account-session", "ExternalId": "my-external-id" } }
{ "command": "DecodeAuthorizationMessage", "params": { "EncodedMessage": "<encoded-message-string>" } }
{ "command": "GetAccessKeyInfo", "params": { "AccessKeyId": "AKIAIOSFODNN7EXAMPLE" } }
{ "command": "GetSessionToken", "params": { "DurationSeconds": 3600, "SerialNumber": "arn:aws:iam::123456789012:mfa/user", "TokenCode": "123456" } }
{ "command": "GetFederationToken", "params": { "Name": "federated-user", "DurationSeconds": 3600, "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}]}" } }
{ "command": "AssumeRoleWithWebIdentity", "params": { "RoleArn": "arn:aws:iam::123456789012:role/WebIdentityRole", "RoleSessionName": "web-session", "WebIdentityToken": "<oidc-token>" } }
STS is foundational to AWS security and is used alongside:
| Relationship | Tool |
|---|---|
| Manages IAM roles/policies | IAMTool |
| Session management | SessionTool (in awsclaw-general) |
| Test AWS connectivity | TestAwsConnectionTool (in awsclaw-general) |
| All AWS services require valid credentials | All awsclaw tools |
GetCallerIdentity to verify which account and identity you're operating as.DecodeAuthorizationMessage when you get "Encoded authorization failure" errors — it reveals the denied action, resource, and conditions.AssumeRole with ExternalId is required for cross-account access when the trust policy mandates it.GetSessionToken with MFA is useful when your account requires MFA for sensitive operations.DurationSeconds (default varies by command).