Skip to content
Latchkey

Amplify "amplify push" no credentials configured in CI

The Amplify CLI uses the standard AWS SDK credential chain. In CI no profile, environment keys, or assumed role were available, so the backend push has nothing to authenticate with.

What this error means

amplify push or amplify init fails early with "Could not load credentials from any providers" or "no credentials" before any CloudFormation work begins.

amplify
init failed
CredentialsProviderError: Could not load credentials from any providers
    at ...
You are not authenticated. Please run amplify configure or set AWS credentials.

Common causes

No credentials exported to the CI step

A local machine has an amplify configure profile, but CI has no ~/.aws/credentials, no env keys, and no assumed role, so the chain finds nothing.

Interactive auth used instead of headless config

amplify push without --yes and without AWS env credentials expects interactive credential selection that cannot happen in CI.

How to fix it

Provide credentials via the AWS action

  1. Configure AWS credentials in the job before calling Amplify.
  2. Pass an OIDC role or environment keys the SDK chain can read.
  3. Run amplify push --yes so it never waits for interactive input.
.github/workflows/ci.yml
- uses: aws-actions/configure-aws-credentials@v4
  with:
    role-to-assume: arn:aws:iam::123456789012:role/amplify-ci
    aws-region: us-east-1
- run: amplify push --yes

Confirm the region is set

Amplify also needs a region; export it alongside the credentials so the SDK resolves an endpoint.

Terminal
export AWS_REGION=us-east-1

How to prevent it

  • Inject credentials through the AWS credentials action, not local profiles.
  • Always pass --yes for headless Amplify backend operations.
  • Set AWS_REGION explicitly in the deploy step.

Frequently asked questions

What causes ""Could not load credentials from any providers""?
A local machine has an amplify configure profile, but CI has no ~/.aws/credentials, no env keys, and no assumed role, so the chain finds nothing.
How do I fix "Could not load credentials from any providers"?
Provide credentials via the AWS action

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card