OIDC Trust Check
Paste an AWS role trust policy and your GitHub Actions environment's branch and tag rules. See, for each release ref, whether GitHub or AWS would block it first.
The role's trust policy JSON, from IAM › Roles › Trust relationships. No credentials.
Repository, environment, account, subject format, the environment's branch and tag rules, and the refs to check. See the worked example below.
Each ref you list gets a row: does the GitHub environment admit it, would the AWS role trust it, and which check blocks it first.
What it does
Moving a production release from a branch to tags touches two gates. The GitHub environment's deployment rules decide whether a job on that ref may use the environment at all, and the AWS role's trust policy decides whether the job's OIDC token may assume the role. A job that names an environment gets a sub claim that names the environment, not the ref, so a ref condition in the trust policy is a separate test. This page builds the default claims for each ref you list, checks both gates, and tells you which one blocks first.
Worked example: main releases, a tag does not
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "GitHubMainRelease",
"Effect": "Allow",
"Principal": { "Federated": "arn:aws:iam::123456789012:oidc-provider/token.actions.githubusercontent.com" },
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
"token.actions.githubusercontent.com:sub": "repo:example-org/release-demo:environment:production",
"token.actions.githubusercontent.com:ref": "refs/heads/main"
}
}
}
]
}
{
"repository": "example-org/release-demo",
"environment": "production",
"accountId": "123456789012",
"subjectFormat": "legacy",
"rules": {
"mode": "selected",
"branches": ["main", "release/*"],
"tags": ["v1.*"]
},
"refs": ["refs/heads/main", "refs/tags/v1.2", "refs/tags/v2.0"]
}
| Ref | GitHub environment | AWS trustIf the job runs | First blocker |
|---|---|---|---|
refs/heads/main |
Matches main |
Matches statement 1 | Both supplied checks match |
refs/tags/v1.2 |
Matches v1.* |
Blocks: ref expects refs/heads/main |
AWS trust policy |
refs/tags/v2.0 |
Blocks: no tag rule matches | Blocks: ref |
GitHub environment |
v1.2 passes GitHub but not AWS: the trust policy still pins ref to refs/heads/main. To allow the intended tag family as well, move ref into a separate StringLike condition and give it both refs/heads/main and refs/tags/v1.*. Keep the exact sub and aud checks under StringEquals. v2.0 stays blocked by GitHub until a tag rule admits it.
How to use it
- Paste the role's trust policy from IAM.
- Write the release configuration: repository, environment, account ID, subject format, the environment's branch and tag rules, and the refs you plan to release from.
- Press Check refs and read the First blocker column. Fix that gate, then check again.
What it does not do
- It uses GitHub's default subject format. Customized subjects come back as Indeterminate; choose
unknownfor them. - Protected-branch rules, approvals, wait timers and workflow triggers are not checked.
- It supports StringEquals and StringLike on aud, sub, ref and environment. Anything else is reported, not guessed.
- It never contacts GitHub or AWS, and nothing you paste is uploaded, saved or put in the address bar.
Questions
Why does my tag release fail with "Not authorized to perform sts:AssumeRoleWithWebIdentity"?
Often the trust policy checks ref for a branch, or the sub was written for a branch, while a job in an environment gets repo:OWNER/REPO:environment:NAME. Paste both here; the AWS column names the key that fails.
Why does GitHub say the tag is not allowed to deploy to the environment?
The environment's deployment rules list branch patterns and tag patterns separately. A tag needs a matching tag rule, even if a branch rule has the same text.
Is a wildcard in the sub condition safe?
A broad StringLike such as repo:example-org/* trusts every repository and environment in that owner. Prefer an exact environment subject, and use this page to confirm it still admits the refs you release from.
What does Indeterminate mean?
The page found something it will not judge safely, such as Protected branches only, a pattern with [ or an unsupported condition operator. It names it instead of guessing.
Do I need to paste credentials?
No. Only the policy document and the configuration JSON. Nothing is sent anywhere.


