Monday, February 22, 2021

how to create and configure vpc in aws


Amazon Virtual Private Cloud is a commercial cloud computing service that provides users a virtual private cloud, by "provision[ing] a logically isolated section of Amazon Web Services Cloud". Enterprise customers are able to access the Amazon Elastic Compute Cloud over an IPsec based virtual private network.



In Single aws region -- we can create 5 VPC
In Single aws VPC    -- we can create 200 subnet
In Single aws account -- we can create 5 elistic IP address

Virtual private cloud (VPC) — A virtual network dedicated to your AWS account.

Subnet — A range of IP addresses in your VPC.

Route table — A set of rules, called routes, that are used to determine where network traffic is directed.

Internet gateway — A gateway that you attach to your VPC to enable communication between resources in your VPC and the internet.

VPC endpoint — Enables you to privately connect your VPC to supported AWS services and VPC endpoint services powered by PrivateLink without requiring an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. Instances in your VPC do not require public IP addresses to communicate with resources in the service. Traffic between your VPC and the other service does not leave the Amazon network.

CIDR block - Classless Inter-Domain Routing. An internet protocol address allocation and route aggregation methodology.  

Step 1) Click on services >> Write VPC and enter


 

Step 2) Click on "Your VPC" >> Create new VPC


 

Step 3) follow below following details.

Write VPC name "my-vpc"
Write IPv4 CIDR "10.0.0.0/16"
User Tenancy    "default"


 

Step 4) Click on "Subnet" >> Create subnet


 

Step 5) follow below following details.

Select VPC ID
write Subnet name "my subnet"
Choose Availability Zone
write IPv4 CIDR "10.0.0.0/24"



 

Step 6) Click on "Internet Gateways" >> Create new Internet Gateway


 

Step 7) Write Internet gateway name >> Click on create internet gateway


 

select internet gateway >> Action >> Attach to VPC


 

select Available VPC >> click on attach Internet gateway


 

Step 8) Click on Route tables >> Create route table


 

write name "my-vpc-route-table" >> select vpc >> create


 

select route table >> Subnet Associations >> Edit subnet associations


 

select subnet >> and save


 

select route table >> Click on routes >> Edit Routes


 

Click on add route >> write "0.0.0.0/0" in Destination >> select "internet gateway" >> save routes


 

Now your VPC created, lets create new EC2 instance under created vpc and check internet connectivity

Select newly created vpc under "network"
Choose enable under "Auto-assign Public IP"
and click on next


No comments:

Post a Comment

testing