0

I was unable to successfully authenticate when attempting to create a GitHub Actions workflow that would authenticate with an AWS IAM Identity Provider (IdP) using Open ID Connect (OIDC), based on this blog: https://aws.amazon.com/blogs/security/use-iam-roles-to-connect-github-actions-to-actions-in-aws/

In GitHub Actions the error appeared as:

Not authorized to perform sts:AssumeRoleWithWebIdentity

In AWS CloudTrail the error appeared as:

    "errorCode": "AccessDenied",
    "errorMessage": "An unknown error occurred",

1 Answer 1

0

The issue was caused by not removing the space after repo: in the IAM Identity Provider Trust relationships' trust policy line that I had copied from the blog

                    "token.actions.githubusercontent.com:sub": "repo: <aws-samples/EXAMPLEREPO>:ref:refs/heads/<ExampleBranch>",

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.