VPC Tutorial #1 : How to set-up a VPC and its components- step-by-step guide!!
In this article I will walk you through the 8 steps guide to launch your first VPC!!. I consider you set-up your own AWS account and possess the basic cloud networking understanding!!
Topics covered
VPC
Subnets
Internet gateway
Nat gateway
Route table
Launch EC2 instance and Test
- Create VPC -
- Create subnet -
- Create Public Subnet
2. Create Private Subnet -
- Create IGW -
- Click on Attach to VPC button
- Select a VPC ID from drop down of available VPC’s
- Click on Attach Internet Gateway.
- Create NAT gateway -
1. Choose public subnet and not private because only public subnet has internet access.
- Now we need Elastic Ip- either choose from already available or click allocate elastic IP button,I will click on allocate elastic ip button.
- Heat Create NAT gateway.
Create and update Route Table (Public & Private)-:
- Create Public route table -
2. Public subnet association
-
Edit routes for Internet gateway.
2.1 Create Private route table -
2.2 Private subnet association
2.3 Edit routes for NAT gateway
Launch Public EC2 instance -
Add name and tags.
Create new key pair and attach it.
Enable auto assign Public IP ( for Browser testing)
Add Inbound rule for SSH - port 22 and HTTP port -80
User data (In Advanced details section) -
6. Heat Launch Instance.
Launch Private EC2 instance - (follow above guide)
Add name and tags.
Create new key pair and attach it.
Don’t Enable auto assign Public IP.
Add Inbound rule for SSH - port 22 only.
Test -
Public Instance -
Copy Public IP and paste it to browser.
Success!!!!
Private Instance -
SSH to Public instance
copy key and paste it to public instance
then ssh from public instance to private instance
Success!!!!
- Cleanup : -
- Delete EC2 instances.
- Disassociate and Release Elastic -IP and delete NAT gateway.
- Delete VPC.
Note - This is the first part of a series dedicated to mastering VPCs. Stay tuned for more VPC insights like peering, Transit gateway, Endpoints and more !!💡
Feel free to drop your thoughts, questions, or feedback in the comments. Let’s learn together!! ☁️🚀
Happy Learning!!
#AWS #Networking #Cloud #VPC #CloudComputing #Hashnode #AWSTutorial #CloudEngineering #TechBlog #DevOps #CloudSkills #VPCTutorial #CloudNetworking #NetworkingEssentials #Hashnode #LearnAWS #CloudEngineers #AWSVPC #DevOps #SRE #InfrastructureEngineering #Platform #TechBlog
Subscribe to my newsletter
Read articles from Shivprasad Waghmare directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Shivprasad Waghmare
Shivprasad Waghmare
"Accidental DevOps Engineer | 7+ Years of Experience | Exploring AWS, Kubernetes, Terraform, Docker, Jenkins | Passionate about automating cloud infrastructure | Let’s explore the world of DevOps together!"