GitHub Actions OIDC Failures Often Stem From Trust Policy Mismatches, Not Permissions
When a GitHub Actions job fails to assume an AWS role via OpenID Connect, the root cause is typically a trust policy mismatch rather than insufficient service permissions. AWS evaluates the OIDC identity through sts:AssumeRoleWithWebIdentity before granting any role session, meaning service permissions like s3:* are irrelevant until trust is established. Key trust inputs include the correct OIDC provider, audience value, and the exact GitHub subject claim, which varies based on workflow context such as whether a GitHub Environment is referenced. Notably, repositories created after July 15, 2026 use an immutable subject format tied to owner and repository IDs, while older repositories retain the name-based format unless opted in. Developers should verify the trust policy reflects the repository's actual subject format and avoid broadening service permissions as a workaround for failed trust decisions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in