Project Description:
We'll explore the core concept of Amazon Web Service (AWS), focusing specifically on virtual Private Clouds (VPCs)
- Subnets
- Gateways
- Routing tables We'll navigate the AWS management console to deploy and manage these critical components effectively.
Project Goals:
- Setting up and configuring VPC, Subnets, internet gateway, NAT gateway
- Enable internet connectivity securely within VPC
- Implement outbound internet access through the NAT gateway.
Step 1: Setting up a Virtual Private Cloud (VPC)
- Navigate to the search bar and enter VPC
- Navigate to the "Create VPC" option and click on it
- Select the "VPC only" option, specify the IPv4 CIDR block, and proceed by clicking on the "Create VPC" button.
Note: If you encounter an error message stating that the CIDR block must be between '/16 and /28' when creating a VPC, it indicates that your provided CIDR block falls outside of this recommended range.
- VPC created
Step 2: Configuring Subnets within the VPC
Navigate to the "Subnets" option located on the left sidebar.
Proceed to click on the "Create Subnet" button.
- Select the ID of the VPC that you created in the previous step
Enter the subnet name, and specify the IPv4 CIDR for the subnet.
choose the availability zone
Specify the IPv4 CIDR for the subnet
To create another subnet, Click on the "Add subnet" button.
Repeat the same steps for the second subnet
Ensuring to specify the subnet name, choose the availability zone, and provide the IPV4 CIDR
Your subnets is being created
Step 3: Creating Internet Gateway
Navigate to the "Internet Gateway"
Click on the "Create Internet Gateway"
Specify the name of Internet Gateway
Click on the "Creating Internet Gateway"
Your internet gateway is being successfully created.
Now, you will notice that it is currently detached, indicating that it is not associated with any VPC. To enable internet connectivity, you must attach the Internet Gateway to the VPC you have previously created.
Now, attach it to the VPC
Successfully attached
Step 4: Creating Route Tables
Let's come to the next part which is enabling internet connectivity with the internet Gateway by setting up routing tables
Proceed to the " Route Tables"
Click on the "Create route table
Enter the name of the route table and select the VPC you previously created
Create a route table
- Click on "Subnet association" followed by "edit subnet associations" to associate the subnet with the route table
- Choose the public subnet and click on Save association.
- Navigate to "Routes" and then click on "Edit routes"
Click on add route
Select "Destination" as "0.0.0.0/0", indicating that every IPV4 address can access this subnet
"Target Field", Choose "Internet Gateway" and then select the Internet Gateway you created. finally, save the changes.
Step 5: Creating NAT Gateway
- Navigate to the "NAT Gateways" then click on "Create NAT Gateway"
Choose the Private subnet
Select the connectivity type as private
Create NAT Gateway
Your NAT Gateway is being created successfully
Select your NAT Gateway.
Navigate to the " Details tab
Locate the subnet ID and click on it
Navigate to the "Route Table" section.
Then click on the "route table ID"
- Proceed to the "Routes" section, then click on "Edit routes"
Then click on "Add routes"
Select "Destination" as "0.0.0.0/0"
In the "Target" field, choose the "NAT Gateway you created.
Finally, save the changes
- On the subnet association section, click on the edit subnet association
- Choose the private subnet and click on "Save associations"
The subnet has been successfully attached to the route table
Top comments (0)