Infra & Cloud yaml Intermediate

GitHub Actions OIDC AWS Auth

Authenticate GitHub Actions to AWS using OIDC without storing long-lived credentials.

yaml
jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: read
    steps:
      - uses: actions/checkout@v4
      - uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: arn:aws:iam::123456789012:role/github-actions
          aws-region: us-east-1
      - run: aws sts get-caller-identity

Prerequisites

  • AWS IAM OIDC provider configured for GitHub

Pro Tips

  • → Scope the IAM role trust policy to your exact repo/branch.

Was this module useful?

Share your experience — it helps the team improve.

Leave Feedback

Commercial Licensing

Acquire a production access token or template license for enterprise deployment.

Module Info

Language
yaml
Level
Intermediate
Read time
4 min
Published
May 2026
License
Commercial License

Newsletter

New modules every week, directly to your inbox.