Project deep dive · Infrastructure & Security

Resilient AWS Infrastructure

AWS infrastructure designed to remain available during an Availability Zone failure, rolls back bad deploys on its own, and runs CI/CD without a single stored AWS key.

The problem

Infrastructure can look healthy until the first real failure: an Availability Zone goes down, a bad release reaches users, or a credential is exposed. This project is designed to handle those scenarios before they become incidents.

Tech stack

AWS

DevOps

What I built

  • Provisioned a multi-AZ VPC with Terraform
  • Set up an Auto Scaling Group behind an Application Load Balancer
  • Configured AWS WAF and GuardDuty
  • Built a GitHub Actions deployment pipeline with health checks and automatic rollback on failed deployments
  • Set up OIDC federation so GitHub Actions never stores an AWS key
  • Wrote the whole environment as Terraform modules, reviewed before every change

Key architecture decisions

  1. Amazon VPC (multi-AZ)

    I split the app and database tiers across two availability zones, so a failure in one Availability Zone does not take the whole application offline.

  2. Elastic Load Balancing & Auto Scaling

    Traffic gets distributed automatically and capacity adjusts to real demand instead of a fixed server count.

  3. AWS WAF

    WAF filters malicious HTTP traffic before it reaches the application.

  4. Amazon GuardDuty

    GuardDuty analyzes AWS activity and signals potential security threats across the environment.

  5. GitHub Actions with automatic rollback

    If a release fails its health checks, the workflow reverts to the last known good version on its own.

  6. OIDC federation

    GitHub Actions assumes a scoped IAM role through OIDC instead of using a stored access key.

  7. Terraform

    The whole environment is code, reviewed before every change, and rebuildable from nothing if it ever needs to be.

Security

Security was designed in from the start, not bolted on afterward.

  • No static AWS keys anywhere in CI/CD
  • Least privilege IAM roles per service
  • WAF protecting public HTTP endpoints
  • GuardDuty for managed threat detection across the AWS environment
  • Private subnets for app and database tiers
  • Infrastructure changes reviewed through pull requests

Challenges

  1. How to avoid a bad deploy turning into an outage

    A GitHub Actions workflow runs health checks after each deployment and automatically rolls back if they fail.

    A broken release gets caught and reverted before it becomes a customer facing incident.

  2. How to deploy without storing an AWS key in CI/CD

    GitHub Actions authenticates through OIDC and assumes a scoped IAM role for just that repository and branch.

    There is no long-lived credential sitting in a secrets store waiting to leak.

  3. How to keep the application available when part of the infrastructure fails

    The application runs across multiple Availability Zones behind an Application Load Balancer, with Auto Scaling replacing unhealthy instances automatically.

    A single instance failure does not require manual action to restore capacity.

Result

  • Infrastructure fully defined and reproducible from Terraform code
  • Application tier deployed across two Availability Zones for redundancy
  • Failed deployments automatically roll back after unsuccessful health checks
  • GitHub Actions deploys to AWS through short-lived OIDC credentials with no stored AWS keys
View on GitHub