Deploying the CloudFormation Stack
- Open EC2.
- Choose Key Pairs, then choose Create key pair.

- 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.

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

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.
- Open CloudFormation:
- Choose Create stack
- Choose With new resources (standard)

- 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

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

- 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

- Choose Next.

- On Configure stack options, keep the default settings.

- Review the details.

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