Virtual Private Cloud (VPC) is custom datacenter in Amazon cloud when we define network (subnets,routing tables,ACL’s..)
In AWS console click VPC under Networking & Content Delivery
Your VPC’s-Create VPC
CIDR Block size must be between 16-28
Tenancy-default-use shared hardware
dedicated-use dedicated hardware (incurs costs)
After creating VPC Route table and Network ACL’s are automatically created
Creating subnets
From VPC dashboard click Subnets-Create Subnet
Under availability zone choose AZ or let AWS chooses it for you (No Preference)
By default addresses won’t be automatically leased to VM’s
click on subnet-subnet actions-Mofidy auto-assign IP settings
Click Auto-assign IPs
3 addresses are reserved:
1-vpc router
2-dns server
3-future use
Creating Internet Gateway
we need gateway in order to allow access to our VPC from the internet
Internet Gateway-Create Internet Gateway
Bind Gateway to subnet-click Attach to VPC
Edit Routing table
We need to allow internet access from subnet
Route Tables-Click on Route table (created during VPC creation)-Click on Subnet Association-Edit)
Click on check-box to assign subnet to Routing Table
Click on Routes-Add another route
Enter route
Create new EC2 instance and select our VPC-under subnet create subnet we created
[…] I used default VPC if you need to create new VPC,take a look here […]
LikeLike