Create a Custom AWS VPC

In this post I'll show you how you can actually create your own VPC, it's pretty simple so all you have to do is you have to log into your AWS console ,  once you are in your console you'll get something like what's shown below. 


All you have to do is simply type in VPC and you get VPC isolated cloud resources, 

You click on that, As soon as you click on that you'll see that you get something like a VPC dashboard which shows what all different options that are available for different the kind of subnets.


Remember these are the different components, And when you create a VPC all these different components  get created the subnets, the routing tables, network ACLs, NAT Gateways all these 

So note ,  to keep things simple we have to use something like a VPC wizard we just simply say launch VPC wizzard.

Now you're given two different options that whether you want to create only a single subnet or you want to create multiple subnets.
So we'll actually use the second one which is the one having VPC with public and private subnet as I showed you in my figure and we will create a VPC with two subnets the public subnet which is for a web server and the private subnet which we'll actually use for the database.


So all we have to do is just simply do a select on Select Button   and this is the kind of form that opens up.

So let's try to take the the the options that are there. So we get a CIDR block, so we use the simple CIDR block which is 10.0.0.0 /16.
I told you that with slash 16 you'll get something like 65536 IP addresses but here you'll see there's actually showing you 5 less, The reason for that is because the 5 IP addresses actually are reserved by AWS so you can't make use of those IP addresses and these are the first four IP addresses and the last IP address.
That's why you get something like a figure which is actually less which is 65531.
So the next stage is IP V6, no we're not going to use IP V6. Next you have to give up VPC name, let's call it "vpc-demo"  
And just to keep things simple we are creating a public subnet and we are creating a private subnet.
Remember the public subnet is on 0.0 and a private subnet is on 1.0
Again the same thing you can see 251 IP addresses all there should be 256 IP addresses because your CIDR notation is 24.

Here you are given a preference whether you want to choose your availability zone or you want database to choose availability zone for based on its understanding of where it wants to place the resources.
Okay let's try and choose it as us-west-2a and this is our public subnet all good 
And as I said to keep things simple I'm actually going to use one availability zone and so in the same availability zone we have a private subnet and we have a public subnet.
And then as we showed you that we use NAT instance so you can just choose a very very small instance in the micro.

And you say enable DNS hostnames, Yes.

And hardware tenancy we keep it as default we don't want to go dedicated and we just simply click on Create VPC and just see in the background what's happening it's actually creating all the different resources for you.


So it is creating the subnet it is actually creating the routing tables for you and right now you can see it's actually creating the NAT instance as we showed you as it was shown in the figure and it's actually showing OK.
You can see that your VPC has successfully been created so you can launch the instances in the subnet of your VPC.


So the kind of boundary that we wanted to form has now been created for us.
It's the boundary of that area or the other the IP network range in which we have to work it has now been created and it is as simple as that.
So if I simply go to your VPC now I can see that there should be something like VPC demo here.
So this is the one that we've just created based on this CIDR notation /16.
If you want to have a look in more detail on this so you can always go to click on this and get the description of it right and you can see the CIDR block notation, That's exactly the one that we used.

So I believe now you've got quite a good amount of confidence on how you can actually create your own VPC.

Happy Learning !!!

DB Alchemist Academy

You may explore our E-Learning Page to have an insight into our High Rated Courses on Udemy

 

 

Share you comments

{{ errorMessage }}