canonical: https://jentic.com/apis/amazonaws.com/sts

# AWS Security Token Service

Jentic publishes the only available OpenAPI specification for AWS Security Token Service, keeping it validated and agent-ready. AWS Security Token Service (STS) issues temporary, limited-privilege credentials for IAM users and federated identities. It supports role assumption, SAML federation, web identity federation (OIDC), and short-lived session tokens used to call other AWS APIs. STS exposes 8 core actions covering AssumeRole, AssumeRoleWithSAML, AssumeRoleWithWebIdentity, GetSessionToken, GetFederationToken, GetCallerIdentity, GetAccessKeyInfo, and DecodeAuthorizationMessage, with both GET and POST variants for each.

## For AI agents

Issue temporary AWS credentials so an agent can assume a role, federate an external identity, or call AWS services with scoped, short-lived permissions.

## Scope

Does not handle long-term IAM user creation, permission policy authoring, or directory management - use for issuing temporary, limited-privilege AWS credentials only.

## Capabilities

- Assume an IAM role across accounts and receive temporary credentials via AssumeRole
- Federate SAML 2.0 identity providers into AWS with AssumeRoleWithSAML
- Exchange OIDC tokens (Cognito, Google, GitHub Actions) for AWS credentials via AssumeRoleWithWebIdentity
- Issue short-lived session tokens for MFA-protected workflows with GetSessionToken
- Resolve the AWS account, ARN, and user ID behind the current credentials with GetCallerIdentity
- Decode encoded authorization failure messages returned by AWS APIs
- Look up the AWS account that owns a specific access key ID

## Use cases

### Cross-Account Role Assumption

Grant an application running in account A temporary, scoped permissions in account B. AssumeRole returns a set of credentials valid from 15 minutes up to 12 hours, optionally restricted further by a session policy. Cross-account roles are the recommended pattern for CI pipelines, multi-tenant SaaS, and partner integrations where long-term access keys are unsafe to share.

Example prompt: Call AssumeRole with RoleArn arn:aws:iam::123456789012:role/ReadOnlyAccess, RoleSessionName agent-session, and DurationSeconds 3600, then return the AccessKeyId, SecretAccessKey, and SessionToken.

### Web Identity Federation for OIDC Workloads

Let a workload that already holds an OIDC token (GitHub Actions job, Kubernetes pod with IRSA, mobile app authenticated via Cognito) call AWS without provisioning long-term keys. AssumeRoleWithWebIdentity validates the JWT, checks the trust policy on the target role, and returns short-lived AWS credentials, eliminating static secrets from CI runners and edge devices.

Example prompt: Call AssumeRoleWithWebIdentity with the GitHub Actions OIDC JWT in WebIdentityToken, RoleArn arn:aws:iam::123456789012:role/GitHubDeployer, and RoleSessionName gh-actions-build-42.

### Identity Verification for Audit Logs

Confirm which principal is making AWS calls before logging or branching on identity. GetCallerIdentity returns the Account, Arn, and UserId of the credentials in use without requiring any IAM permissions. It is the standard probe for sanity-checking which role a Lambda, CodeBuild project, or assumed-role session is actually running as.

Example prompt: Call GetCallerIdentity and return the Account, Arn, and UserId of the active session.

### Agent-Driven Temporary Credential Provisioning via Jentic

When an AI agent needs to call other AWS services on behalf of a user, it should not hold long-lived keys. Through Jentic, the agent submits an intent like 'assume the read-only role and list S3 buckets'; Jentic executes AssumeRole with a scoped session policy, holds the resulting credentials in its vault, and signs subsequent API calls on the agent's behalf. The agent never sees the SecretAccessKey.

Example prompt: Through Jentic, search for 'assume an aws iam role', load the AssumeRole operation schema, and execute it with RoleArn and a session policy that restricts the agent to s3:GetObject on a single bucket.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /#Action=AssumeRole | Assume an IAM role and receive temporary credentials |
| POST | /#Action=AssumeRoleWithSAML | Federate a SAML 2.0 identity into AWS |
| POST | /#Action=AssumeRoleWithWebIdentity | Exchange an OIDC token for AWS credentials |
| POST | /#Action=GetCallerIdentity | Return the principal of the current credentials |
| POST | /#Action=GetSessionToken | Get an MFA-protected session token |
| POST | /#Action=DecodeAuthorizationMessage | Decode an encoded AWS authorization failure |

## Key resources

- **AssumeRole operations** — Three role-assumption flavours: AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity
- **Session tokens** — GetSessionToken and GetFederationToken for short-lived credentials
- **Identity inspection** — GetCallerIdentity and GetAccessKeyInfo for principal lookup
- **Authorization diagnostics** — DecodeAuthorizationMessage for unpacking encoded denial messages

## Why Jentic

- **Setup:** Wiring AWS Security Token Service by hand means computing SigV4 signatures against the global sts.amazonaws.com endpoint and encoding each Action into the request yourself. Through Jentic you install once, import Security Token Service from the API Directory, store the access keys once, and your agent calls it.
- **Permission scoping:** STS selects behaviour by an Action parameter rather than resource ids in the path, so scope the agent to the operations it needs, such as GetCallerIdentity and GetSessionToken. You choose the operations it may call, so credential-minting actions like AssumeRole are not included unless you add them.
- **Credential handling:** Your AWS access keys are stored once, encrypted, by your own Jentic One instance and used to sign each STS request with SigV4 at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'assume an IAM role and get temporary credentials' or 'get the caller identity', and Jentic returns the matching STS operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Amazon Cognito Identity** — Cognito Identity issues AWS credentials to mobile and web app users via identity pools, while STS targets server-side role assumption.
- **AWS Single Sign-On** — AWS SSO manages workforce identity and SAML federation into AWS accounts; STS is the underlying mechanism that issues the resulting temporary credentials.
- **AWS CloudTrail** — CloudTrail records every STS call (AssumeRole, GetCallerIdentity, etc.) so you can audit who assumed what role and when.

## FAQ

### Why is there no official OpenAPI spec for AWS Security Token Service?

AWS does not publish an OpenAPI specification for AWS Security Token Service; it ships Smithy models and language-specific SDKs instead. Jentic generates and maintains this OpenAPI spec so that AI agents and developers can call AWS Security Token Service via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the AWS Security Token Service use?

STS uses AWS Signature Version 4 (SigV4): an HMAC-SHA256 signature over the request, sent in the Authorization header. Through Jentic, your AWS access key ID and secret access key sit encrypted in the vault and Jentic computes the SigV4 signature for each call, so the raw secret never enters the agent's context.

### Can I use STS to grant cross-account access to an external partner?

Yes. Create an IAM role in your account whose trust policy lists the partner's AWS account ID (and optionally an ExternalId), then have the partner call AssumeRole with that RoleArn. They receive temporary credentials scoped to that role's permissions, with no long-term keys exchanged.

### What are the rate limits for the AWS Security Token Service?

STS has a default account-level rate of around 600 transactions per second per region for AssumeRole and similar actions, with higher limits available on request. The regional STS endpoint (sts.us-east-1.amazonaws.com style) gives lower latency than the global sts.amazonaws.com endpoint.

### How do I assume a role through Jentic?

Search Jentic with the intent 'assume an aws iam role', load the schema for AssumeRole, and execute with RoleArn, RoleSessionName, and an optional DurationSeconds. Jentic returns the temporary AccessKeyId, SecretAccessKey, and SessionToken in a structured response.

### Is AWS STS free to use?

Yes. STS itself has no charge; you pay only for the underlying AWS resources the temporary credentials are used to access.

### What is the difference between AssumeRole and GetSessionToken?

AssumeRole switches into a different IAM role (often in another account) and returns credentials with that role's permissions. GetSessionToken keeps the same identity as the calling user but returns short-lived credentials, typically used to satisfy an MFA requirement before performing a privileged action.

### Can I limit what my agent is allowed to do with the AWS Security Token Service API?

Yes. Because Jentic One is self-hosted, you run your own instance and your own rules decide which STS operations and credentials the agent may use. STS selects behaviour by an Action parameter rather than resource IDs in the path, so you can scope the agent to only the operations it needs, such as GetCallerIdentity and GetSessionToken. Credential-minting actions like AssumeRole are not available to the agent unless you explicitly add them, and your AWS access keys stay encrypted on your instance and are used only to sign each request.
