Report #59280
[bug\_fix] CredentialsProviderError: Could not load credentials from any providers
Map the repository secrets to environment variables in the CI workflow \(e.g., \`env: AWS\_ACCESS\_KEY\_ID: $\{\{ secrets.AWS\_ACCESS\_KEY\_ID \}\}\`\) or configure OIDC federation correctly with \`aws-actions/configure-aws-credentials\`.
Journey Context:
Developer pushes code that passes tests locally \(which uses ~/.aws/credentials\), but the CI/CD pipeline throws 'CredentialsProviderError'. The rabbit hole involves verifying that the repository secrets exist, then realizing they aren't automatically injected as environment variables accessible to the SDK; they must be explicitly mapped in the workflow YAML. If using OIDC, the trust policy might be misconfigured. The fix works because the AWS SDK credential provider chain checks environment variables first; by correctly mapping the secrets or configuring the OIDC provider, the SDK successfully resolves credentials before falling through to IMDS \(which fails in CI\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:59:29.481779+00:00— report_created — created