{
  "id": 10387472,
  "title": "GitHub Actions OIDC to AWS: dropping long-lived access keys",
  "url": "https://urgent.news/2026/09/28/github-actions-oidc-to-aws-dropping-long-lived-access-keys",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-28T07:02:31.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/oleksandr_kuryzhev_42873f/github-actions-oidc-to-aws-dropping-long-lived-access-keys-pig"
  },
  "original_language": "en",
  "account": "The article discusses the risks associated with using long-lived AWS access keys in GitHub Actions and how to migrate to a more secure method using OIDC (OpenID Connect) to AWS. The key points are:\n\n1. Long-lived access keys in GitHub Actions secrets represent a liability as they can be leaked, stolen, or forgotten to rotate, making them vulnerable to attacks.\n\n2. GitHub Actions OIDC to AWS introduces short-lived, per-run credentials issued by AWS STS (Security Token Service), eliminating the need for long-lived keys that can be compromised.\n\n3. OIDC federation allows GitHub's token service to present a signed JWT (JSON Web Token) to AWS, which trusts the token due to a configured identity provider. AWS then returns temporary credentials using the configure-aws-credentials action.\n\n4. It is recommended to create the OIDC provider once per AWS account, not per repository, to avoid duplication and AWS errors when creating duplicate providers.\n\n5. The trust policy of the IAM role should be explicitly scoped to a specific repository, branch, environment, or pull-request context by matching on the sub claim in the token, which encodes this information. This prevents any workflow in any repository from assuming the role.\n\n6. Granting broad AWS permissions due to a narrow trust policy is discouraged. The role should only have the necessary permissions for the specific tasks the pipeline performs, following the principle of least privilege.\n\n7. Separate roles should be used for different environments or deployment stages, such as staging and production, to maintain distinct permission sets and prevent a compromised PR from widening its blast radius.\n\n8. Explicit permissions should be set at the job or workflow level, with the id-token permission set to write, to ensure the OIDC token request succeeds. The contents permission should also be set accordingly for actions like checkout.\n\n9. Avoid using the aws-actions/configure-aws-credentials action via @main tag, as this exposes it to potential supply-chain compromises. Instead, pin to a specific commit SHA for a stronger guarantee.",
  "summary": "Originally published on kuryzhev.cloud If your repository still has AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY sitting in GitHub Actions secrets, you are carrying a liability. Those keys rotate on nobody's schedule but an attacker's. GitHub Actions OIDC to AWS replaces that pattern with short-lived, per-run credentials issued by AWS STS. There is no long-lived key to leak, screenshot, or forget…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}