Automated AWS Infrastructure & Container Deployment Pipeline
A fully automated AWS infrastructure and container deployment pipeline built with Terraform, Docker, and GitHub Actions. The project provisions EC2 instances, configures networking and security groups, and deploys containerized applications — all from a single pipeline trigger. Remote state is managed in S3 with DynamoDB locking to support team collaboration safely.
Tech Stack
The Challenge
Infrastructure was being provisioned manually, leading to environment drift, inconsistent deployments, and no audit trail. Scaling required significant manual effort every time.
Architecture
Terraform modules define reusable infrastructure components — VPC, EC2, security groups, and IAM roles. Remote state stored in S3 with DynamoDB state locking ensures safe concurrent runs. Docker images are built and pushed to a container registry before the EC2 instance pulls and runs the latest version.
Deployment Strategy
GitHub Actions orchestrates the full pipeline: Terraform plan on pull request for review, Terraform apply on merge to main, followed by SSH-triggered container deployment to the EC2 instance. Rollback is handled by re-running a previous workflow run.
Outcome
Infrastructure provisioning time reduced from hours of manual work to under 10 minutes. Environment drift eliminated. Full audit trail of every infrastructure change via GitHub Actions run history.