AWS Infrastructure & Deployment Automation
Converting manually managed AWS infrastructure into declarative CloudFormation templates and automating deployments.
Problem
Infrastructure was being managed manually through the AWS Console, which led to configuration drift, unreproducible environments, and time-consuming scaling processes.
My Role
As the DevOps Engineer for Cleared to Drive, I was responsible for evaluating the existing AWS footprint, capturing its requirements, and translating the entire architecture into declarative Infrastructure as Code.
Constraints
The migration had to occur without disrupting active production workloads. The solution needed to utilize native AWS tools where possible to avoid introducing unnecessary third-party dependencies to the client's stack.
Implementation & Decisions
I authored comprehensive AWS CloudFormation templates to codify the environment. Key implementation details included:
- Migrating compute workloads to Graviton instances to optimize cost-to-performance ratios.
- Implementing Auto Scaling Groups to handle variable traffic patterns efficiently.
- Configuring automated backup mechanisms and defining lifecycle policies for resilient storage management.
- Moving CI/CD deployments to self-hosted GitHub Actions runners to ensure secure execution within the VPC boundary.
- Setting up WireGuard networking for secure internal access.
Repeatable provisioning was critical; it allowed us to spin up exact replicas of the production environment for staging and testing, completely eliminating the "it works on my machine" class of errors.
Troubleshooting
During the migration, Nginx routing inconsistencies surfaced due to legacy configuration assumptions. I investigated the routing layer, identified the mismatch between the load balancer health checks and the container exposed ports, and corrected the routing rules within the CloudFormation stack.
Validation & Outcome
The templates were validated using AWS CloudFormation staging and change sets before execution. The final outcome was a fully reproducible AWS environment managed entirely through code, allowing the team to confidently deploy changes and recover from potential failures rapidly.
Lessons
Codifying an existing, manually configured environment often uncovers hidden dependencies. Capturing exact network rules and security group configurations early in the planning phase proved essential to a smooth transition.