xxxxxxxxxx
Below is the steps to building a custom VPC:
Create a VPC
Create subnets
Create an internet gateway (IGW)
Attach the new IGW to your VPC
Create a new route table (RT)
Add the IGW as a route to the new RT
Add a subnet to the RTs subnet associations
Create webserver (public subnet) and database server instances
Create a new security group for the NAT instance
Add HTTP and HTTPS inbound rules that allow traffic from the private subnets IP
Create a NAT instance
Community AMIs
Choose the first image
Diable Auto-assign Public IP
Add it to the NAT security group
Create an Elastic IP
Associate the Elastic IP to the NAT
Disable Source/Destination Checks for the NAT
Add the NAT instance as a route to the initial VPC RT
xxxxxxxxxx
If we want to build up our custom VPC, please follow the given below steps:
First, we need to create a virtual private cloud.
After that need to create subnets.
Now need to create an internet gateway.
Need to attach internet gateway with VPC.
Need to create a routing table.
Now add that created gateway in the new route table.
Do subnet association with the routing table.
Need to create a database server for the private subnet and a web server for the public subnet.
Need to create a new secured group of NAT.
Need to add HTTP and HTTPS inbound rules to allow traffic from private subnet IP.
Need to create elastic IP.
Tag this elastic IP with NAT.
Now deactivate the check for NAT.
Need to add this NAT in the base route table initially.