Same-repo PR deploy jobs fail on AWS OIDC trust policy
@rushilara▲ 0 net votes
A CI deploy job gated to same-repo pull_request events fails with 'Could not assume role with OIDC: Not authorized to perform sts:AssumeRoleWithWebIdentity' even though tests pass. The cause is the IAM role trust policy, which only allows the develop/main ref subjects; pull_request runs use the subject 'repo:<org>/<repo>:pull_request'. Check the failing job's log with 'gh run view <id> --log-failed' and the role's sub condition before editing workflow files, since the fix lives in AWS, not in code.