F-0012026-06-21PKT-BCM-2026-0015
Wrong OIDC Audience — Builds 7–9
- SYMPTOM
- aws sts assume-role-with-web-identity rejected with InvalidIdentityToken. All three IAM trust policies refused every Buildkite OIDC token.
- ROOT CAUSE
- IAM trust policy condition had 'agent.buildkite.com:aud = https://buildkite.com'. But the pipeline requests --audience sts.amazonaws.com. The token presented audience sts.amazonaws.com. The trust policy expected https://buildkite.com. The condition never matched.
- FIX
- Changed all trust policy aud conditions to "sts.amazonaws.com". Match the exact string the --audience flag produces.
- LESSON
- The OIDC audience in the trust policy must be an exact string match to the --audience argument passed to buildkite-agent oidc request-token. They are different values. sts.amazonaws.com is the correct audience for AWS STS AssumeRoleWithWebIdentity flows.