AWS CDKTF Terraform
Client: Trinet USA
Role: Senior Principal Software Engineer
Environment: Python, AWS CDK, Terraform CDKTF, NodeJS, PostgreSQL
Project Description
This project focused on developing Infrastructure as Code (IaC) for the client’s existing cloud development infrastructure using Terraform CDKTF. The objective was to reverse-engineer the existing architecture and automate the deployment process using modern IaC principles and tools.
Key Responsibilities
- Reverse-Engineered Existing Infrastructure:
Analyzed and restructured the current AWS environment into a manageable and automated Terraform CDKTF codebase. - EC2 Automation Using Userdata:
- Created
base64-encoded
userdata scripts to configure EC2 instances at launch. - Added
cron jobs
via userdata for scheduled task execution. - Installed and configured
systemd
services for auto-start on boot. - Pulled required configuration/files using
aws s3 cp
. - Configured
32 GB swap space
usingmkswap
, integrated into the startup sequence.
- Created
- Networking and Load Balancing:
- Dynamically generated load balancers, listeners, and listener rules within CDKTF.
- Configured subnets and security groups via
.tfvars
and Terraform CDKTF. - Created and validated Route53 DNS records for EC2-based web applications.
- Reusable and Destroyable Infrastructure:
Wrote CDKTF code to ensure all infrastructure is fully reproducible, modular, and cleanly destroyable when needed.
Outcome
The project resulted in a robust, automated, and scalable cloud infrastructure, significantly improving deployment efficiency, maintainability, and system reliability across environments.