Context
DataStream Inc., a global data analytics company, is expanding its operations to support real-time analytics across multiple AWS regions. The current infrastructure is limited to a single region, causing latency issues and availability concerns during peak loads. To enhance performance and resilience, the VP of Engineering mandates a multi-region architecture using Terraform for infrastructure as code.
Scale Requirements
- Regions: Deploy in 3 AWS regions (us-east-1, eu-west-1, ap-southeast-1)
- Resources: Each region must support at least 10 EC2 instances, 5 RDS databases, and 3 S3 buckets
- Throughput: Minimum of 1,000 requests per second per region
- Latency: < 100 ms for cross-region data access
- Availability: 99.99% uptime across all regions
Requirements
- Organize the Terraform repository for modular deployment (e.g., separate modules for EC2, RDS, S3).
- Implement remote state management using Terraform Cloud or S3 with state locking via DynamoDB.
- Create a CI/CD pipeline for automated deployments using GitHub Actions or AWS CodePipeline.
- Ensure IAM roles and policies are defined for secure cross-region access.
- Include tagging for cost tracking and compliance.
Constraints
- Team: 3 data engineers with limited Terraform experience.
- Budget: Monthly infrastructure cost should not exceed $10,000.
- Compliance: Must adhere to GDPR and data residency regulations.