This project demonstrates a production-grade deployment of a three-tier VPC architecture using AWS CloudFormation. It includes:
- ✅ Public subnet with Auto Scaling Group and S3 Bucket
- 🔐 Private subnets for Application and Database tiers.
- 🌐 Internet Gateway and secured internet access
- 🛡️ Security Groups and Route Tables for tier isolation
- 📦 Modular CloudFormation templates for easy deployment
| Tier | Subnet Type | Components |
|---|---|---|
| Public Tier | Public Subnet | EC2 Instances, Auto Scaling Group, S3 Bucket |
| App Tier | Private Subnet | API Gateway, Lambda Functions |
| DB Tier | Private Subnet | RDS or EC2-based database |
├── LICENSE - MIT-0 License file
├── README.md - This file
├── assets - Images and diagrams
├── templates - CloudFormation templates
│ ├── app-tier.yaml - Application tier CloudFormation template
│ ├── db-tier.yaml - Database tier CloudFormation template
│ └── vpc.yaml - VPC CloudFormation template
└── scripts - Scripts for deployment
├── deploy-app-tier.sh - Deploy Application tier CloudFormation stack
├── deploy-db-tier.sh - Deploy Database tier CloudFormation stack
└── deploy-vpc.sh - Deploy VPC CloudFormation stack
└── destroy-all.sh - Destroy all CloudFormation stacks
- VPC with CIDR block
10.0.0.0/16 - 2 Availability Zones for high availability
- Public Subnet with IGW and Auto Scaling Group
- Private Subnets with API Gateway, Lambda Functions, and RDS or EC2-based database
- Security Groups for tier isolation and controlled access
- Route Tables for subnet-level routing
- CloudFormation Templates for modular deployment
aws cloudformation deploy \
--template-file templates/vpc.yaml \
--stack-name vpc-stack \
--capabilities CAPABILITY_NAMED_IAM
--parameter-overrides VpcCidr=10.0.0.0/16 AvailabilityZones=us-east-1a,us-east-1baws cloudformation deploy \
--template-file templates/app-tier.yaml \
--stack-name app-tier-stack \
--capabilities CAPABILITY_NAMED_IAM \
--parameter-overrides VpcId=<VPC_ID> VpcCidr=10.0.0.0/16 AvailabilityZones=us-east-1a,us-east-1baws cloudformation deploy \
--template-file templates/db-tier.yaml \
--stack-name db-tier-stack \
--capabilities CAPABILITY_NAMED_IAM \
--parameter-overrides VpcId=<VPC_ID> VpcCidr=10.0.0.0/16 AvailabilityZones=us-east-1a,us-east-1b- VPC Flow Logs enabled for all traffic
- Security Groups and Route Tables configured for tier isolation
- Bastion Host with SSH access to private subnets
- NAT Gateway for outbound internet access
- EC2 Instances and Auto Scaling Groups in private subnets
- DB tier locked down to App tier only
- NAT Gateway used for secure outbound traffic from private subnets
DCyberguy website: https://playroom-security.com
This library is licensed under the MIT-0 License. See the LICENSE file.
