AWS NAT GATEWAY-End to End Project Demo
🚀 Aspiring Cloud and DevOps Engineer | 💡 Tech Explorer | 🌟 Learning Every Day
👋 Hey there! I'm Vaishnavi kawde, a passionate tech enthusiast with big dreams of conquering the cloud and diving deep into the world of DevOps.
🌩️ Join me on my exciting journey as I embark on a quest to master the art of cloud computing and DevOps. I may be a fresher, but my curiosity knows no bounds, and my determination to learn is unwavering.
💻 I'm constantly experimenting, breaking things, and fixing them back, all in the pursuit of knowledge. I believe that the cloud is the future, and DevOps is the magic wand that makes it all happen seamlessly.
🌌 Follow my adventures on Hashnode as I document my discoveries, share my learnings, and connect with fellow tech enthusiasts and mentors. Let's grow, learn, and explore the possibilities of technology together.
🚀 Whether it's setting up my first virtual machine, automating deployments, or scripting my way to infrastructure as code, I'm on a mission to soak up every bit of wisdom from the tech cosmos.
📚 Remember, every expert was once a beginner, and I'm excited to take my first steps into the world of Cloud and DevOps. Let's make this journey an epic one! 🌟
Follow me on Hashnode, and let's inspire and learn from each other in this amazing tech community! 🌐✨#CloudExplorer #DevOpsJourney

About the project:
✅ This example demonstrates how to create a VPC that you can use for servers in a production environment.
✅ The server can connect to the internet by using a NAT gateway. To improve resiliency you deploy the NAT gateway in both availabilty zones.
Overview:
✅ The VPC has public subnets and private subnets in two availability zones.
✅ Each public subnet contains a NAT gateway.
✅ private subnet can connect to the internet by using the NAT gateway.
Creating an AWS NAT Gateway involves several steps:
✅ Create a VPC (Virtual Private Cloud)
✅ Create Subnets
✅ Create an Internet Gateway (for Public Subnet)
✅ Create Route Tables
✅ Associate Subnets with Route Tables
✅ Create EC2 Instances (for Testing)
✅ Create a NAT Gateway
✅ Update the Route Table for Private Subnets
Step 1: The creation of vpc go to the search bar and type vpc you will see an option click on that.
Log in to the AWS Management Console.
Navigate to the VPC Dashboard:
Click on "Services" in the top left corner.
Under "Networking & Content Delivery," select "VPC."
Click the "Create VPC" button.
Fill in the VPC details, such as name, IPv4 CIDR block, and optionally IPv6 CIDR block.
Configure the rest of the settings as needed (e.g., enable DNS resolution and DNS hostname support).
Click "Create VPC."

Step 2: create 2 subnets public and private.
In the VPC Dashboard, click on "Subnets" in the left-hand navigation pane.
Click the "Create subnet" button.
Fill in the subnet details, including VPC, availability zone, and IPv4 CIDR block.
Click "Create subnet."

Step 3: Create an Internet gateway
Create an Internet Gateway (for Public Subnet)
In the VPC Dashboard, click "Internet Gateways" in the left-hand navigation pane.
Click the "Create Internet Gateway" button.
Give your internet gateway a name and click "Create internet gateway."
Select the newly created internet gateway and click "Attach to VPC."
Choose the VPC you created in step 1 and click "Attach internet gateway."


Step 4: Create Route Tables
In the VPC Dashboard, click "Route Tables" in the left-hand navigation pane.
Create two route tables: one for the public subnet and one for the private subnet.
Click the "Create route table" button.
Give it a name and select your VPC.
Click "Create route table."


Step 5: Associate Subnets with Route Tables
In the VPC Dashboard, select "Subnet Associations" under each route table.
Edit the associations for the public route table:
Select the public subnet(s) you created earlier and associate them with the public route table.


Step 6: Create EC2 Instances (for Testing)
In the EC2 Dashboard:
Click on "Services" in the top left corner.
Under "Compute," select "EC2."
Launch an EC2 instance in your public subnet and private subnet.
Follow the EC2 instance creation wizard, selecting the appropriate settings.
Ensure that the instance has a security group that allows outbound traffic (e.g., SHH, HTTP).
Add a public IP address to the instance if needed.

Step 8: Create a NAT Gateway
In the VPC Dashboard, click on "NAT Gateways" in the left-hand navigation pane.
Click the "Create NAT Gateway" button.
Configure the NAT Gateway settings:
Select the public subnet where you want to create the NAT Gateway.
Choose an Elastic IP address or create one if needed.
Click "Create NAT Gateway."

Step 8: Update the Route Table for Private Subnets
In the VPC Dashboard, go to "Route Tables."
Edit the route table associated with your private subnet(s).
Add a route:
Destination:
0.0.0.0/0Target: Select the NAT Gateway you created in step 7.
Save the route table changes.
Now, your private instances should be able to access the internet via the NAT Gateway, and your public instances should have direct internet access. Be sure to clean up resources when you're done to avoid ongoing charges.