This project demonstrates the deployment of a secure AWS networking environment using AWS CloudFormation. The infrastructure includes a custom VPC, public and private subnets, routing components, security controls, and an EC2 instance provisioned through Infrastructure as Code (IaC).
This CloudFormation template provisions an isolated AWS environment consisting of:
- Amazon VPC
- Public Subnet
- Private Subnet
- Internet Gateway
- NAT Gateway
- Elastic IP
- Route Tables
- Security Group
- Amazon EC2 Instance
The architecture follows common AWS networking best practices by separating internet-facing resources from internal resources.
Internet
│
▼
Internet Gateway
│
▼
Public Route Table
│
▼
Public Subnet (10.0.0.0/24)
│
┌──┴─────────────┐
│ │
▼ ▼
EC2 Instance NAT Gateway
│
▼
Private Route Table
│
▼
Private Subnet (10.0.1.0/24)
The CloudFormation stack was successfully deployed and all resources reached the CREATE_COMPLETE state.

- Amazon VPC
- Public Subnet
- Private Subnet
- Internet Gateway
- NAT Gateway
- Elastic IP
- Route Tables
- Security Group
- EC2 Instance
- CIDR Block:
10.0.0.0/20 - DNS Support Enabled
- DNS Hostnames Enabled
- CIDR Block:
10.0.0.0/24 - Auto-assign Public IP Enabled
- CIDR Block:
10.0.1.0/24 - No Direct Internet Access
- Enables internet connectivity for public resources
- Provides outbound internet access for private resources
Public Route Table
0.0.0.0/0 → Internet Gateway
Private Route Table
0.0.0.0/0 → NAT Gateway
Allowed inbound traffic:
| Port | Protocol | Purpose |
|---|---|---|
| 80 | TCP | HTTP |
| 22 | TCP | SSH |
- Instance Type:
t3.micro - Operating System: Amazon Linux 2
- Deployed in Public Subnet
Detailed documentation is available in the docs directory:
- 01-vpc.md
- 02-subnet.md
- 03-internet-gateway.md
- 04-nat-gateway.md
- 05-route-table.md
- 06-security-group.md
- 07-ec2.md
- AWS CloudFormation
- Infrastructure as Code (IaC)
- Amazon VPC
- Public & Private Subnets
- Internet Gateway
- NAT Gateway
- Route Tables
- Security Groups
- Amazon EC2
- AWS Networking Fundamentals
- Cloud Infrastructure Design
Ensure AWS CLI is installed and configured with valid credentials.
aws cloudformation create-stack \
--stack-name MyLabStack \
--template-body file://cloudformation/vpc-template.yaml \
--capabilities CAPABILITY_IAMMonitor deployment progress through:
AWS Console
→ CloudFormation
→ Stacks
aws-foundations-project
├── README.md
├── cloudformation
│ └── vpc-template.yaml
├── diagrams
│ └── diagrams.jpeg
├── docs
│ ├── 01-vpc.md
│ ├── 02-subnet.md
│ ├── 03-internet-gateway.md
│ ├── 04-nat-gateway.md
│ ├── 05-route-table.md
│ ├── 06-security-group.md
│ └── 07-ec2.md
└── screenshots
