AWS Error: ExpiredTokenException / The security token included in the request is expired

Temporary STS/SSO session credentials expired past their TTL.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: AWS Error Platform: Cloud
Common Root Causes:
  • Temporary STS/SSO session credentials expired past their TTL.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Refresh session via `aws sso login` or rely on EC2/ECS/Lambda IAM role auto-refresh.
Safe Diagnostic Command:
aws sts get-caller-identity
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Temporary STS/SSO session credentials expired past their TTL. Recommended diagnostic: `aws sts get-caller-identity`. Remediation: Refresh session via `aws sso login` or rely on EC2/ECS/Lambda IAM role auto-refresh.

Worked Examples

  • Run `aws sts get-caller-identity` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-aws-sts-expired-token-exception · Independently verified: 2026-11-25

Related Resources