You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains a fully automated, production-ready AWS infrastructure built using Terraform.
It includes VPC networking, subnets, NAT gateways, bastion host, application servers, Network Load Balancer (NLB), Route53 DNS, ACM TLS certificates, RDS MySQL, Auto Scaling Group (ASG), S3 static hosting, CloudFront CDN, CloudWatch monitoring and more.
Architecture Overview
The Terraform code provisions:
Networking
1 VPC (10.10.0.0/16)
Public subnets (2개 AZ: ap-northeast-2b, 2c)
Private subnet (1개 AZ)
Internet Gateway
NAT Gateway with Elastic IP
Route tables and routing configuration
Security groups for public, private, database layers
Network ACLs for additional security
Compute
Bastion host (public subnet) - Ubuntu
AWS Linux Server (private subnet)
RedHat Server (private subnet)
Auto Scaling Group (private subnet)
Launch Template based instances
Min 1, Max 3
CPU-based scale-in/scale-out
Load Balancing
Network Load Balancer (NLB)
Listener ports: 80/TCP, 443/TLS, 8080/TCP
Target Group automatically populated by ASG instances
Domain & TLS
Hosted Zone via Route53 (insung-terraform.com)
ALIAS record (api.insung-terraform.com) → NLB
ACM certificate with DNS validation
TLS termination on NLB (port 443)
Database
RDS MySQL 8.0 (db.t3.micro)
8GB allocated storage
Automatic backup enabled (7 days retention)
Backup window: 03:00-04:00 UTC
Caching
ElastiCache Redis 7.1 (cache.t3.micro)
Single node cluster
Port 6379
Deployed in VPC subnet group
Static Storage + CDN
S3 Bucket (private, CloudFront OAC access only)
CloudFront CDN with Origin Access Control
Price Class: PriceClass_200 (North America, Europe, Asia)