Skip to main content

Creating a VPC - Part 2

In my previous article, Creating a VPC - Part 1, I've shown you how to create a VPC using the VPC Wizard.  Here I will demonstrate how to build a VPC manually, without using the Wizard.

We will use the same requirements:
1. End users are located in US Northern Virginia
2. VPC requires 1 Private and 1 Public subnet with the private subnet having
    outbound access to the internet.
3. Defined CIDR Block is 10.0.0.0/16


Method 2: Creating a VPC manually

1. Login to the AWS management console using your Admin account.
2. Select your location based on where your end users will be. In this
    case it is US Northern Virginia (US East 1)
3. Click "Services", then scroll down to Network & Content Delivery
    and then click "VPC".

4. From the Navigation pane click on "Your VPCs".
5. Then click "Create VPC"

6. Enter the name you wish to give your VPC.  Then enter the CIDR Block
    for your VPC as well.
    Here you can also setup IPv6 if needed or just leave it ad default if not.
    As for Tenancy, you have a choice dedicated or default.
    Click "Create
7. You will receive a confirmation that your VPC has been created.
    Click "Close" on this window.
    You should now see your VPC on the list.
8. Now we have to create the subnets to fulfill our requirements.
    On the Navigation pane click on "Subnets"
9.   Click on "Create subnet".
10. Enter the name you want to give your subnet. I'm naming it MyPublicSN.
      Choose your VPC from the list
      Choose the Availability zone you wish to deploy it to.
      Then provide the CIDR Block for this subnet. I'm using 10.0.0.0/24.
      Click on the "Create" button after verifying your settings.
      Your Public subnet is now created. Click the "Close" button to close
       the window.
11. Now we still have to create the Private subnet.
      To do this you can follow the same steps from step number 10. 
      This time just name the subnet differently to denote it's the Private subnet.
      I'm naming it MyPrivateSN
      The CIDR Block I'm assigning it is: 10.0.1.0/24
      

12. Now that we have both Subnets, it is time for us to make the necessary
      configurations to make one subnet a private subnet and the other
      a public subnet.
      To do this we need to first create an Internet Gateway (IGW).
      This will be your door to the Internet.
      So on the Navigation Pane click "Internet Gateways"
      Then click "Create Internet gateway"
      Provide it a name (I named it: MyIGW) then click "Create"

13. Click "Close" to go back to the Internet Gateway window.
      Now we need to attach the IGW to our VPC.
      Select the IGW you created, click "Actions" and then click "Attach to VPC"
      Select your VPC from the list and then click the "Attach" button.
 
14. Now we need to create the necessary Route Tables for the Private and
      Public Subnet.
      From the Navigation panel click "Route Tables"  
      You will see one for the VPC you created and another for the Default VPC.
      Choose the one associated to your Custom VPC.
      Click "Actions" then click "Add Tags"
      For the tag type "Name" then provide a value.  I called it PrivateRoute.
      Click "Actions" again and then click "Edit subnet associations"
      Select your Private Subnet and then click "Save"
15. The Private Route table has now been created and associated to the
      Private Subnet.
      Now we need to create the Public Route table.
      Click on "Create route table".
      For the Name tag, give it a name.  Mine is PublicRoute.
      Choose your Custom VPC from the VPC box.
      Then click "Create"
16. Click "Close".  Then select your newly created Route table.
      Click "Actions".  Then click "Edit subnet associations"
      Select your Public Subnet and then click "Save"
17. Now that we have the Public subnet associated with this PublicRoute table
      we need to add an additional Route to allow Internet traffic to go out of our
      network through the Internet Gateway (IGW) we created a while ago.
      So click "Routes". Then click "Edit Routes"
      Click "Add route".
      Then under Destination enter "0.0.0.0/0" and for Target choose your IGW
      Click "Save route"
18. Now our Public Subnet has an official Route to the Internet through
      our IGW.
19. Next step is to setup "Auto-Assign IP address on your Public Subnet so that
      all instances created in this subnet will be assigned an internet routable IP.
      To do this, from the Navigation pane click on "Subnets". Then select your
      public subnet from the list. Click "Actions".
      Then click "Modify auto-assign IP Settings".  Check the box to enable
      auto-assign public IPv4 address.

20. We have one more last requirement to complete. That is to provide an
      outbound route for our Private subnet.
      If you look at the PrivateRoute, you will see that the only entry is a local
      destination route.
      To give it a route to the internet you will have to first create a NAT gateway
      in the Public Subnet and then route internet traffic to that NAT from your
      private subnet.
      So from the Navigation Pane click on "NAT Gateway" then click
      "Create NAT Gateway"

      Select your Public Subnet from the list.  Then Click "Create New EIP"
      Then click " Create a NAT Gateway"
   
21. On the next page click on "Edit Route Tables".  This will bring you to
      the Route Tables section.
      Here select the Private Route table you have created.  Click "Routes".
      Then click "Edit Routes".  Click the "Add route" button then for the
      destination type 0.0.0.0/0.  and then for the Target choose your
      NAT Gateway.  Then click on "Save routes"

      Now we have completed all our requirements for the Custom VPC and
      have build one from scratch.  You should be proud of yourself for being
      able to do this! Good job!

   

Comments

Popular posts from this blog

Welcome!

Hello dear readers! Welcome to my blog where I present the world of cloud computing on AWS.  Here you will find information that'll help you understand what it is, where it is, and how you can use it.  This blog will include AWS facts and news, use cases and projects, guides and instructions, tips and tricks, and a whole lot more to follow as I continue to develop this site to be a one stop shop for everyone wanting to know how AWS ome AWS is. (wink.. wink...) So keep on reading through the articles to find what you want and feel free to comment on what contents you would like to see in the future.  Have a great day everyone!

AWS End User Computing

The End User Computing category comprises of services which cater to Workstation Services needs.  It provides virtualized computer terminals as well as an Application Streaming service in a client-server setup. Here are the two services that are currently in this category. WorkSpaces        - Amazon Workspaces enables you to provision virtual, cloud-based Microsoft Windows desktops for your users, known as WorkSpaces.  It eliminates the need to procure and deploy hardware or install complex software.  You can quickly add or remove users as your needs change.  Users can access their virtual desktops from multiple devices or web browsers.        - Virtual terminals (VDI).  A way of having your desktop in the cloud. WorkDocs        - Amazon WorkDocs is a fully managed, secure, enterprise storage and sharing service with strong administrative controls and feedback capabilities that improve user prod...

AWS Machine Learning Services

The Machine Learning Services category comprises of several services that cater to the use of machine learning technology.  The managed services make it easy for application developers to build smart and robust application that make use of ML models.   Here is a list of all the current Machine Learning services available.  Amazon SageMaker        - Build, train, and deploy machine learning models at scale.  This allows for the quickest way to get ML Models from idea to production. Amazon Comprehend        - Amazon Comprehend is a continuously-trained natural language processing service.        - It's free to try and easy to get started analyzing unstructured text like customer reviews and news articles. DeepLens        - Deep learning-enabled video cameras.  AWS DeepLens is powerful enough for experts, but designed to help developers get started quickly with litt...