aws
auth_error
ai_generated
true
botocore.exceptions.NoCredentialsError: Unable to locate credentials
ID: aws/no-credentials-error
90%Fix Rate
92%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 2 | active | — | — | — |
Root Cause
AWS SDK can't find credentials. Missing env vars, config, or IAM role.
genericWorkarounds
-
95% success Configure credentials: aws configure, or set env vars, or use IAM role
aws configure # sets ~/.aws/credentials
Sources: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
-
92% success In EC2/ECS/Lambda: use IAM role (no credentials needed)
use IAM role (no credentials needed)
Sources: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
Dead Ends
Common approaches that don't work:
-
Hardcode credentials in source code
95% fail
Security risk — credentials in git history
-
Set AWS_ACCESS_KEY_ID in .env and commit
90% fail
Same security risk as hardcoding
Error Chain
Preceded by: