Scripts and Terraform runs fail on your laptop with "ExpiredToken: The security token included in the request is expired."
BeginnerTroubleshootingCloud provider issues
Answer
Likely causes → Temporary credentials (from IAM Identity Center/SSO, assume-role, or MFA sessions) have a fixed lifetime and have expired. Old exported AWS_SESSION_TOKEN variables in the shell override a fresh profile.
Diagnose →
aws sts get-caller-identity
env | grep ^AWS_
aws configure list
Fix → Refresh the session (aws sso login --profile prod) and unset stale environment variables (unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN).
Prevent → Use named SSO profiles with automatic refresh, set a role session duration that fits the work, and never paste long-lived keys into shells or CI.
More on Cloud provider issues
A deploy script and several services start failing with "An error occurred (ThrottlingException) when calling the DescribeInstances operation: Rate exceeded".BeginnerThe Auto Scaling group can't launch new instances during a traffic spike; activity history says "We currently do not have sufficient c6i.4xlarge capacity in the Availability Zone you requested."BeginnerScaling out fails with "You have requested more vCPU capacity than your current vCPU limit of 256 allows for the instance bucket that the specified instance type belongs to."BeginnerThe AWS Health Dashboard reports increased error rates in `use1-az4`, and your ALB targets in that AZ are timing out intermittently.IntermediateServices in private subnets randomly fail outbound calls to a partner API; CloudWatch shows `ErrorPortAllocation` rising on the NAT gateway.AdvancedA data pipeline writing millions of small objects to S3 starts failing with "503 Slow Down: Please reduce your request rate."Intermediate