Join our Newsletter — 33% off our NHI Course

AWS STS Service Bearer Token

An AWS STS Service Bearer Token is a bearer token issued by AWS Security Token Service for a service to authenticate to certain AWS services without using long-lived credentials. It is a temporary secret that carries the caller’s permissions and must be protected like any other access token because anyone who holds it can use it until it expires.

What an AWS STS service bearer token is

An AWS STS service bearer token is a temporary bearer secret issued by aws security token service that lets a service authenticate to specific AWS services without relying on long-lived credentials. Because possession equals use, the token itself becomes part of the trust boundary.

Its defining security property is simplicity for the caller and sensitivity for defenders. The token is not a password, but it functions like one while it remains valid, so exposure, logging, copying, or reuse can create immediate access risk.

Where this token fits in AWS authentication

This token sits in the machine-to-machine authentication path, where one AWS-managed service needs a short-lived way to prove it is allowed to act. It is part of a broader shift away from static access keys and toward temporary credentials that expire automatically.

That design reduces standing exposure, but it does not remove the need for trust policy design, audience scoping, and careful handling of the token at every hop. A bearer token can be easier to deploy than a signed, proof-of-possession credential, yet it is also easier to replay if copied.

For background on the wider pattern of cloud workload authentication, see Cloud Workload Identity Guide and AWS STS and AssumeRole Guide.

Why bearer semantics change the risk profile

Bearer semantics mean the token confers access to whoever holds it, not just to the service or runtime that was originally intended to use it. That makes transport security, memory handling, log hygiene, and short lifetime especially important.

In practice, the main danger is replay. If the token is captured from a misconfigured application, debugging output, intercepted traffic, or a compromised host, an attacker can use it until expiry unless additional compensating controls are in place. General token handling guidance is well covered in Token and Session Security Guide.

For the broader bearer-token model and its security properties, the IETF basis is RFC 6749: The OAuth 2.0 Authorization Framework. When stronger replay resistance is needed, compare bearer use with sender-constrained designs such as RFC 8705: OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens and RFC 9449: OAuth 2.0 Demonstrating Proof of Possession (DPoP).

How organisations should think about exposure and control

Exposure is usually created by the surrounding system, not by STS alone. The important questions are where the token is generated, where it is cached, whether it is ever written to logs, and whether the runtime that receives it is itself appropriately isolated and monitored.

Controls should focus on temporary credential discipline: narrow duration, limited scope, explicit trust conditions, and reliable revocation paths if misuse is suspected. Detection should also look for abnormal token use patterns that suggest replay or unauthorized forwarding, especially in automated estates with many services and shared infrastructure.

For teams that manage AWS and other cloud workload identities, the key design challenge is to make the token transient enough to be safe while still usable enough for automation. Token Lifetime Policy Design Guide is useful when deciding how short “short-lived” should be in real systems.

Where bearer tokens are part of a larger non-human identity program, OWASP Non-Human Identity Top 10 provides a useful external reference point for secret handling, privilege, lifecycle, and reuse risk.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST SP 800-53 Rev 5 IA-5 — Authenticator Management Covers lifecycle protection for temporary credentials and tokens used for service authentication.
IA-9 — Service Identification and Authentication Applies because the token enables service-to-service authentication in AWS.
AC-6 — Least Privilege Bearer tokens should carry only the permissions a service needs for the shortest viable window.
Recommendation — Manage token issuance, lifetime, storage, and revocation to reduce bearer-token exposure. Use service authentication controls that bind service access to controlled, temporary credentials. Constrain the token’s effective privileges to the minimum required for the service workflow.
OWASP Non-Human Identity Top 10 NHI-02 — Secret Leakage Bearer tokens are sensitive secret material whose exposure directly enables misuse.
NHI-05 — Overprivileged NHI The token may represent a non-human service with permissions that should be tightly bounded.
Recommendation — Prevent token leakage in logs, traces, debug output, and build artifacts. Reduce the token’s privileges so a stolen token cannot reach broader AWS capabilities.

Practitioner Guidance

Why practitioners should care: Treat an AWS STS service bearer token as an active access credential, not a harmless metadata artifact. If it is copied, exposed, or retained longer than intended, it can become a direct path to unauthorized service access.

What to watch for: Review application telemetry, debug output, and integration paths for accidental token exposure, and prefer controls that reduce the chance of replay rather than relying on perfect secrecy. When a token is discovered outside its intended path, assume it may have been observed and evaluate downstream rotation or revocation needs immediately.

Practitioner takeaway: The safest bearer token is one that is short-lived, minimally scoped, never logged, and never assumed to be harmless just because it is temporary.