configure-aws-credentials says no OpenID Connect provider exists for GitHub
No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.comShort answer
AWS has no IAM identity provider for GitHub's token issuer in the account that holds the role. Create an OpenID Connect provider with the URL https://token.actions.githubusercontent.com and the audience sts.amazonaws.com in that same account, or fix a provider that was made in another account or with a wrong URL.
Fix it fast
1Find out which cause you have
List the OIDC providers in the AWS account that owns the role your workflow assumes. Compare the list with the account ID inside role-to-assume.
aws sts get-caller-identity aws iam list-open-id-connect-providers2Match what you see, then jump to its fix
- 1
The list has no entry ending in token.actions.githubusercontent.comThe GitHub identity provider was never created in the accountFix - 2
The provider exists, but in another account than the one in role-to-assumeThe provider lives in a different AWS account than the roleFix - 3
A provider exists, but its URL is different from the issuer, for example a typo, a port or a pathThe provider was created with a wrong URL or audienceFix
- 1
What does the error look like?
No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com
Cause 1 of 3
The GitHub identity provider was never created in the account
1Check
The provider is an IAM entity. It has to exist once per account before any role can trust it.
aws iam list-open-id-connect-providers2Fix
Create the provider with GitHub's issuer URL and the audience sts.amazonaws.com, which is the audience for the official action. The thumbprint list is optional, because IAM uses its trusted CA library.
aws iam create-open-id-connect-provider \
--url https://token.actions.githubusercontent.com \
--client-id-list sts.amazonaws.com3Verify
The new provider is listed.
aws iam list-open-id-connect-providersConfirmed by docs.github.com
Cause 2 of 3
The provider lives in a different AWS account than the role
1Check
An OIDC provider used in a role trust policy must be in the same account as the role. Compare the account ID in the role ARN with the one from get-caller-identity.
aws sts get-caller-identity --query Account --output text
echo "<role-arn-from-workflow>"2Fix
Create the provider in the account that owns the role, and point the trust policy's Federated principal at that account's provider ARN.
"Principal": {
"Federated": "arn:aws:iam::<account-id>:oidc-provider/token.actions.githubusercontent.com"
}3Verify
Re-run the failed job from the Actions tab and watch the credentials step.
aws iam list-open-id-connect-providersConfirmed by docs.aws.amazon.com
Cause 3 of 3
The provider was created with a wrong URL or audience
1Check
The URL is case-sensitive, must start with https://, and should not contain a port number. The audience must match what the workflow sends: sts.amazonaws.com with the official action.
aws iam list-open-id-connect-providers
aws iam get-open-id-connect-provider --open-id-connect-provider-arn <provider-arn>2Fix
Delete the wrong provider and create it again with the exact URL and audience. Also make sure the job asks for the token.
permissions:
id-token: write
contents: read3Verify
Run the workflow and watch the configure credentials step pass.
aws iam get-open-id-connect-provider --open-id-connect-provider-arn <provider-arn>Confirmed by docs.aws.amazon.com
How do I stop it coming back?
- Create the GitHub OIDC provider in your infrastructure code, once per AWS account.
- Limit the role's trust policy with the :sub condition, so only your repositories and branches can assume it.
- Keep id-token: write at job level where possible; it only lets the job request a token, not change resources.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
- RaheebA consumer app shipped to both stores from one Flutter codebase on a .NET and Azure back end.
- Loade DriverThe driver side of a delivery platform: live jobs, routing and earnings, past 5K Google Play downloads.
Related fixes
Servers
Status code 460 on an AWS Application Load Balancer
elb_status_code 460 in ALB access logs
A 460 is generated by the load balancer, not by your app.
3 causes, each with a fixServers
Application Load Balancer returns 504 for requests to EC2 instances
HTTPCode_ELB_504_Count
A 504 from an Application Load Balancer means it could not get an answer from a target in time.
4 causes, each with a fixServers
Apache has a certificate, but https:// does not open
No line with :443 in the output of ss -ltnp
HTTPS needs four things at once: mod_ssl loaded, Apache listening on 443, a virtual host on 443 with SSLEngine on, and a firewall that lets 443 in.
4 causes, each with a fixServers
Docker push to Artifact Registry fails from GitHub Actions with a permission error
Permission 'artifactregistry.repositories.uploadArtifacts' denied on resource
The identity your workflow authenticates as lacks the permission artifactregistry.repositories.uploadArtifacts on the target repository.
4 causes, each with a fixServers
aws emr --steps fails: Error parsing parameter, Expected '=', received 'EOF'
Error parsing parameter '--steps': Expected: '=', received: 'EOF' for input:
The AWS CLI tried to read your option as shorthand key=value pairs and ran out of text where it expected an equals sign.
3 causes, each with a fixServers
AWS CLI says you must specify a region
You must specify a region. You can also configure your region by running "aws configure".
The AWS CLI sends every request to one region and has none to use.
4 causes, each with a fix