GitHub Actions + Terraform CI/CD for AWS Lambda with OIDC
My GitHub Actions pipeline for AWS Lambda and Terraform: OIDC deploys with no stored AWS keys, S3 state locking, a prod approval gate, and alias rollback.
Pipelines that build, test, and ship, without a checklist in someone's head.
I use the CI you already have when it can do the job.
The stages match how this app is built, tested, and shipped.
Secrets stay out of the log, and a known-bad dependency fails the build.
The pipeline should still be obvious when a second service shows up.
These show up when they fit the job.
Jenkins
Travis CI
Azure DevOps
Ansible
Jenkins
Travis CI
Azure DevOps
AnsibleWhether staging and production get the same build. If production rebuilds from source, what you tested is not what you shipped. I build one image, tag it with the commit SHA, and promote it.
GitHub Actions and GitLab CI can both use OIDC to assume an AWS IAM role. Then there are no long-lived access keys sitting in CI secrets.
ECS, Kubernetes, and load balancers all decide on health checks. If the check only returns 200 from a static route, a broken release looks fine.
How to redeploy the previous image tag, and whether the migration that shipped with it can be reversed or has to roll forward.
A flaky test teaches the team to hit rerun. Then a real failure gets rerun too. I fix or quarantine those before adding new stages.
Writing
Posts that sit next to this work.
My GitHub Actions pipeline for AWS Lambda and Terraform: OIDC deploys with no stored AWS keys, S3 state locking, a prod approval gate, and alias rollback.
How I use AI as a first-pass reviewer for Terraform and Lambda pull requests, while keeping human judgment on the risky parts
AI agents write code fast. They also write bugs, security holes, and nonsense. Here is the 12-item checklist I run before merging anything an agent touched.