3 hours 27 minutes
In this video,
create a custom VPC step by step
and we will test our V p c for reach ability.
Hello and welcome back to the course.
In our last video,
we defined what is a virtual private cloud or V p. C.
And we introduced the components of our default VPC.
In this video, we dive right in and create our first vpc from scratch.
After completing the next few videos,
you should be able to put all of the pieces together and hopefully really begin to solidify your understanding of AWS.
This is going to be a fun exercise, so let's get started.
So of course,
no architect builds anything without first creating the blueprints
here We have a logical diagram of our V p C that we will be creating.
We will remain within the same US East region that we have been using throughout the course.
We will create two sub nets.
One sub net will be a public or Internet facing sub net.
The second will be in a private sudden. It
we will create two e c two instances
and place one of them in the public sub net
and the other in the private.
We will also create two security groups,
a route table
and an Internet gateway.
We will also create a
network access control list and Nat Gateway.
We haven't discussed nap gateways yet, but essentially the Nat Gateway will permit out private Web server to update itself over the Internet. So stay tuned.
So let's log into the AWS console and type V P. C in the search bar
that will take us to the VPC dashboard,
then click VPC.
We should only have our default VPC available.
Let's click. Create VPC.
I will give the VPC the name of cyber ery and the score custom underscore VPC.
I will use the 10.0 dot 0.0 slash 16 cider
that gives us the most possible I P addresses.
I will select the Amazon I. P V six option
to provide us with the I. P V six addresses.
Tendency. You can leave as default. The other option is dedicated, which means
that we would have our own dedicated hardware which were very expensive,
then click create.
So now our custom VPC has been created,
but we still have a lot to configure
I like to filter on just our V p c to keep it clear.
So you see that r V P. C has been created
with the 10.0 dot 0.0 cider and a slash 16 17 mask.
Next we click sub nets.
We will create our public sub net first.
I like to name my tag to reflect the I P address and availability zone that it will reside in.
We attached the sub net to our custom VPC
availability zone will be us East dash one, eh?
And this will be the tin 0.0 dot Tenn 0.0 slash 24 7 it
Now we see that our public sub net has been created.
I will filter in R V P C to clean the screen up some.
Now let's create our private sub net
Same process here, except this subject will be 10.0 dot 20.0 slash 24.
Attach it to our custom. VPC
and the availability zone will be
us dash east Dash one B
and now we see that are private sub net has been created.
We see that each sub net has 251 i p addresses available.
Next click Internet gateways
create Internet Gateway.
I will name this cyberia. I'm score custom on score VPC
They will need to attach our gateway to our V P. C.
So under actions select
attached to V P. C.
Then select the only choice which is our custom. Vpc
Now click route tables.
One route table was created by a WS for custom. Vpc.
It's called the main route table.
I will just the screen so that you could see the options below.
So the rallying table the AWS created for us is Internet facing.
This means that we could be potentially exposing our sub nets to the Internet.
Our design calls for us to only have the public sub net
Internet facing, so we will need to create a new route table
quick, create round table.
We will call this cyber and score custom on score a route on the score table
and attach it to our V P. C.
Now we need to create a new default route
that point to our Internet gateway.
then edit routes
we will add to default routes one for I P before
and the other for I. P V six
and our Internet gateway will be the target for both.
Then save the routes,
then click close.
Next, we will need to associate our public sub net with the default routes that point to our custom Internet gateway.
quick, the round table tab.
Then edit Route Table Association.
Let's select our custom Roundtable,
now our public submit should have Internet access.
One last thing.
Let's set it up so that our public I p automatically assigns a public i p address to any of the easy to instance
that we launch from within the public. Seven It
everyone. Great job. So far,
we have already built major portions of our V P C to include the sub nets route table and Internet Gateway.
Let's take a break and return to part two of the lab.
We will launch our E C two instances and create our security groups