Deploying the CloudFormation Stack

Deploying the CloudFormation Stack

  1. Open EC2.
    • Choose Key Pairs, then choose Create key pair.

AWS CloudFormation

  1. For Name, enter cfn-keypair.
    • Choose Key pair type RSA.
    • Choose Private key file format .pem.
    • Choose Create key pair.
    • This key pair will be used when creating the CloudFormation stack.

AWS CloudFormation

  1. The key pair is created successfully, and the file cfn-keypair.pem is downloaded to your computer.

AWS CloudFormation

Store the cfn-keypair.pem file in a safe place and do not share it. You will use this file to SSH into the Bastion Host in the next section.

  1. Open CloudFormation:
    • Choose Create stack
    • Choose With new resources (standard)

AWS CloudFormation

  1. Create the stack:
    • Choose Choose an existing template
    • Choose Upload a template file
    • Download the template cfn-aws-three-tier-demo.yaml to your computer
    • Choose Choose file
    • Select the downloaded file
    • Choose Next

AWS CloudFormation

  1. For Stack name, enter cfn-aws-three-tier-demo.
    • KeyPair: choose cfn-keypair

AWS CloudFormation

  1. Complete the Parameters section:
    • MasterUsername: enter the database user name, for example admin
    • MasterUserPassword: enter a password with at least 8 characters that does not contain /, @, ", or spaces
    • SSHLocation: we recommend changing it to <your_public_ip>/32 to allow SSH only from your computer
    • Leave the remaining parameters at their defaults

AWS CloudFormation

  1. Choose Next.

AWS CloudFormation

  1. On Configure stack options, keep the default settings.
    • Choose Next.

AWS CloudFormation

  1. Review the details.
    • Choose Submit.

AWS CloudFormation

  • Wait for the stack to reach the CREATE_COMPLETE status.
  1. Choose the Outputs tab.
    • Copy the WebTierLoadBalancerURL value.
    • Paste it into your browser.

AWS CloudFormation