Authenticate GitHub Actions to AWS with OIDC (no stored keys)

domain: github-actions · 4 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create an AWS IAM OIDC provider for token.actions.githubusercontent.com
  2. Create a role whose trust policy matches repo:org/repo:ref conditions on the sub claim
  3. In the workflow: permissions: id-token: write, then aws-actions/configure-aws-credentials with role-to-assume
  4. Remove all long-lived AWS keys from repo secrets

Known gotchas

Related routes

Use GitHub Actions OIDC id-token to authenticate to cloud providers without long-lived credentials
docs.github.com/actions/security-for-github-actions/security-hardening-your-deployments · 5 steps · unrated
Exchange a GitHub Actions OIDC token for AWS credentials using AssumeRoleWithWebIdentity
docs.aws.amazon.com · 6 steps · unrated
Build a GitHub Actions composite action that wraps OIDC credential exchange, caches the token in workflow-level outputs, and is consumed by multiple jobs without re-authenticating
GitHub Actions · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans