---
title: "Don’t hardcode IAM credentials in GitHub!"
description: "Instead of distributing long-lived IAM access keys to GitHub Actions, Scribd uses an AWS IAM OIDC identity provider so workflows assume IAM roles via aws-actions/configure-aws-credentials, avoiding key rotation and tracking problems."
url: "https://swe.quest/articles/don-t-hardcode-iam-credentials-in-github-efc515eb186f4e22"
canonical: "https://tech.scribd.com/blog/2026/teraform-oidc-module.html"
source: "Scribd Tech"
published: "2026-01-06"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 2
tags: ["identity-auth","ci-cd","infrastructure-as-code","cloud"]
---

# Don’t hardcode IAM credentials in GitHub!

A post on [Scribd Tech](https://swe.quest/sources/scribd.md), published 2026-01-06, 2 min read, Announcement. Original: [https://tech.scribd.com/blog/2026/teraform-oidc-module.html](https://tech.scribd.com/blog/2026/teraform-oidc-module.html)

## Summary

Instead of distributing long-lived IAM access keys to GitHub Actions, Scribd uses an AWS IAM OIDC identity provider so workflows assume IAM roles via aws-actions/configure-aws-credentials, avoiding key rotation and tracking problems. To avoid repeating per-repository setup of the OIDC provider, role trust scoped to a repo and branch, and S3/ECR read or write policies, Scribd open sourced terraform-oidc-module, shown with a sample configuration taking the token URL, client IDs, thumbprints, repo refs and custom policy ARNs.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md) (Infrastructure)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- AWS IAM roles and policies ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- GitHub Actions ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))
- Terraform basics ([easy posts on Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md?difficulty=easy))

## Keywords

OpenID Connect, GitHub Actions, AWS IAM, Terraform, terraform-oidc-module, aws-actions/configure-aws-credentials

## Related posts

- [Inside Figma: getting out of the (secure) shell](https://swe.quest/articles/inside-figma-getting-out-of-the-secure-shell-990a1f1d9b7e2fa4.md): Figma · 2021-09-02 · Medium · 9 min read · Identity & auth, Cloud platforms, Security
  Figma replaced its SSH bastion hosts with a zero-trust shell access system built on AWS SSO (backed by Okta with WebAuthn and device trust) and AWS Systems Manager Session Manager, so instances need no exposed SSH ports and access uses short-lived, minimally privileged IAM role credentials.
- [How Hugging Face Scaled Secrets Management for AI Infrastructure](https://swe.quest/articles/how-hugging-face-scaled-secrets-management-for-ai-infrastructure-9737f7d559f7a125.md): Hugging Face · 2025-03-31 · Medium · 5 min read · Security, Kubernetes, Identity & auth, Infrastructure as code, CI/CD
  Hugging Face moved secrets management to Infisical as its infrastructure grew from AWS-only to multi-cloud (Azure, GCP), choosing it over HashiCorp Vault for developer workflows and multi-cloud abstraction.
- [Docker OIDC connections for GitHub Actions available for Docker Orgs](https://swe.quest/articles/docker-oidc-connections-for-github-actions-available-for-docker-orgs-3b185b228d75b17a.md): Docker · 2026-07-31 · Medium · 4 min read · Identity & auth, CI/CD, Supply chain security, Containers
  Docker Hub now accepts GitHub Actions OIDC tokens, letting workflows exchange a signed per-run JWT for a short-lived, scoped Docker access token instead of storing long-lived PATs or OATs as secrets.
- [How to create an AWS S3 bucket for Postgres backups](https://swe.quest/articles/how-to-create-an-aws-s3-bucket-for-postgres-backups-1b827136764e94f1.md): Neon · 2024-10-28 · Medium · 4 min read · Cloud platforms, Identity & auth, PostgreSQL, CI/CD, Multi-tenancy
  Part 1 of a series on automating nightly Postgres backups from many Neon projects to S3 via scheduled GitHub Actions covers the AWS setup.
- [Security Disclosure Recommendation: Redeploy Buckets and Reconnect GitHub After the Credential Reset](https://swe.quest/articles/security-disclosure-recommendation-redeploy-buckets-and-reconnect-github-after-3877fd6f9ee92bd0.md): Railway · 2026-10-22 · Medium · 4 min read · Incidents & postmortems, Identity & auth, Security, Deployment
  After a security disclosure, Railway invalidated and regenerated S3 access keys for every storage bucket and removed the GitHub tokens it held, including GHCR registry tokens stored on services.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
