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.
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
- Configure AWS credentials in the job before calling Amplify.
- Pass an OIDC role or environment keys the SDK chain can read.
- Run amplify push --yes so it never waits for interactive input.
- 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 --yesConfirm the region is set
Amplify also needs a region; export it alongside the credentials so the SDK resolves an endpoint.
export AWS_REGION=us-east-1How 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.