Web Server

Task: Deploy and Update CloudFormation by using automation to make changes in your cloud infrastructure, such as deploying and editing a CloudFormation template. Using a CloudFormation template, deploy and modify a VPC, an S3 bucket and an EC2 instance running a simple web server.

CloudFormation Stack


To begin the process of deploying a CloudFormation stack that creates a simple VPC, you need to download a CloudFormation template and open it with your preferred Text Editor for viewing and editing. Some text editors you can use are Notepad++, Brackets, Komodo Edit, or Visual Studio Code. The template used in this lab is simple_stack.yaml

VPC (Amazon Virtual Private Cloud)


Information about the CloudFormation simple_stack.yaml template.

  • It is a VPC (Amazon Virtual Private Cloud)
  • It has a logical ID known as SimpleVPC
  • It has a Type which tells CloudFormation which type of resource to create
  • It has Properties that define the values used to create the VPC
  • Prerequisite - Prepare Template



    Let's begin launching the CloudFormation stack and deploy AWS resources in an AWS account using the simple_stack.yaml template.

    Specify Stack Details


    Review and ensure that the stack details are correct. For the Stack name field, input CloudFormationLab.

    Configure Stack Options


    Configure stack options. I entered Owner in the left column which is the key, and my email address in the right column which is the value. I will not use additional permissions or advanced options so I clicked Next.

    Review


    Reviewed the stack configuration CloudFormationLab before I clicking on Create stack

    CloudFormationLab Stack Created



    Both CloudFormationLab and SimpleVPC stacks are now created.

    Updating Parameters


  • Navigate to the AWS CloudFormation console
  • Select Stacks
  • Tick the created stack name (e.g. CloudFormationLab is my stack name)
  • Select Update
  • Left Use current template selected
  • Specifying Stack Details

  • Clicked Next
  • On the Specify stack details screen I now have the opportunity to change the Parameters
  • Changed PublicEnabledParam to true
  • Changed EC2SecurityEnabledParamo true
  • Clicked Next
  • Clicked Next again, until directed to the Review CloudFormationLab screen
  • Scrolled down to Change set preview and noted several resources are being added
  • At the bottom of the page, selected I acknowledge that AWS CloudFormation might create IAM resources with custom names
  • Clicked Create stack

  • Configure Stack Options


    Settings for Configure stack options left as is.

    Review CloudFormationLab