In this post, we’ll create a VPC via CloudFormation templates.
Each AZ will have two subnets (public/private), and the public subnet associated with public route table which has internet gateway and the private subnet is associated with Nat Gateway.
Template stack details
- CIDR Range: 192.168.0.0/16
- PublicSubnet01: 192.168.0.0/18 && PublicSubnet02: 192.168.64.0/18
- PrivateSubnet01: 192.168.128.0/18 && PrivateSubnet02: 192.168.192.0/18
- EnableDnsSupport && EnableDnsHostnames
- Internet Gateway and NAT Gateway
Click Here to download the template
Step1: Login in AWS console and Open Cloudformation by click on Services -> Cloudformation
Step2: Click on Create Stack Option -> With new resources (standard)
follow the below steps:
Step 3: Enter the Stack name and verify/modify the CIDR range or Subnets.
After this Click on Next -> Review Everything and -> Click on Create Stack Option
It will take few minutes to create all the resources.
Verify: Click on Services -> VPC
Verify: VPC Subnets
By using above tutorial we have Created VPC bu using CLOUDFORMATION.
Please Drop Comment if you faced any issue at any point, I will try to help asap