This project demonstrates how to design and deploy a custom Virtual Private Cloud (VPC) in AWS using Terraform and the AWS Console.
Create a custom VPC with a public subnet, internet gateway, route table, security group, and EC2 instance.
- Custom VPC (10.0.0.0/16)
- Public subnet (10.0.1.0/24)
- Internet Gateway
- Route table with default route
- Security group allowing SSH and HTTP
- EC2 instance in public subnet running nginx
- Created a custom VPC
- Created a public subnet
- Attached an internet gateway
- Configured a route table and association
- Created a security group
- Launched an EC2 instance in the public subnet
- Installed nginx and verified via browser
- Provider: AWS
- Region: us-east-1
- Files:
terraform/main.tf
- See
cli-commands/README.mdfor example AWS CLI commands
Screenshots are saved in the screenshots/ folder:
ec2-in-vpc.png→ EC2 instance launched in public subnetec2-public-ip.png→ Public IPv4 assigned to EC2ec2-security-group.png→ Security group attached to EC2nginx-vpc-test.png→ Nginx web server running and accessible via browser
- SSH and HTTP are open to 0.0.0.0/0 for demo purposes
- In production, access should be restricted by IP
- Private subnets and NAT gateways should be used for backend resources