Skip to content

Creating a Virtual Private Cloud (VPC) with AWS CloudFormation

Notifications You must be signed in to change notification settings

rproenza86/vpc_with_cloudFormation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

vpc_with_cloudFormation

Creating a Virtual Private Cloud (VPC) with AWS CloudFormation

Overview

AWS CloudFormation is a way to deploy your infrastructure resources and applications on AWS in a reliable, repeatable manner using a called template.

Because the template used by CloudFormation acts as documentation to show exactly what is being deployed.

Use case description

Create an Amazon Virtual Private Cloud (VPC) using AWS CloudFormation.

Update the VPC adding two new subnets.

Infrastructure objectives

  • Deploy an AWS CloudFormation template that creates an Amazon VPC
  • Examine the components of the template
  • Update a CloudFormation stack
  • Examine a template with the AWS CloudFormation Designer
  • Delete a CloudFormation stack

How to use

Create Stack

  1. In the AWS Management Console, on the Services menu, click CloudFormation.

  2. Click Create Stack.

  3. Select Upload a template to Amazon S3.

  4. Click Choose File or Browse to select the vpc.yaml located on the v1 directory, then click Next.

  5. At the Specify Details page, do the following:

    • Stack name:
    • Click Next
    • >

      The Options page allows you to specify tags, permissions and advanced options. You will use the default values.

  6. Click Next.

  7. Review the configuration on the Review page, then click Create.

Examine the VPC

  1. On the Services menu, click VPC.

  2. In Filter by VPC in the top-left corner, select Lab VPC.

  3. In the left navigation pane, click Your VPCs.

  4. Select Lab VPC.

  5. In the left navigation pane, click Internet Gateways.
  6. In the left navigation pane, click Subnets.
  7. In the left navigation pane, click Route Tables.

  8. Select the Public Route Table.

  9. Click the Routes tab in the lower half of the window.

  10. Click the Subnet Associations tab.
  11. On the Services menu, click CloudFormation.

  12. Select the Lab stack.

  13. Click the Outputs tab.

Update Stack

Once a CloudFormation stack has been deployed, it is recommended that any changes to the resources should be made through CloudFormation rather than by directly modifying the resources.

  1. In the Actions menu, click Update Stack.

  2. Select Upload a template to Amazon S3.

  3. Click Choose File or Browse to select the vpc.yaml template located on the v2 directory.

  4. Click Next.

  5. Click Next.
  6. Scroll to the bottom of the screen, then click Next.
  7. It indicates that two new Subnets will be created. In addition, two Route Table Associations will be added, to associate these Subnets with their appropriate Route Tables.

  8. Scroll to the bottom of the screen, then click Update.

Delete Stack

  1. In CloudFormation select the Lab stack.

  2. In the Actions menu, select Delete Stack, then click Yes, Delete.

  3. Click the Events tab to view details of the deletion.

  4. Click Refresh until the stack is deleted.

Releases

No releases published

Packages

No packages published