Deploy the Infrastructure and Application
The first step of this lab is to deploy the static web application stack. If you have already run the following two labs (and have not torn down the resources) then you have already deployed the necessary infrastructure. Proceed to next step Configure Execution Environment
If you have not already deployed the necessary infrastructure, then follow these steps:
- You will first deploy an Amazon Virtual Private Cloud (VPC)
- You will then deploy a Static WebApp hosted on Amazon EC2 instances
- For each of these deployments:
- If you are comfortable deploying a CloudFormation stack, then use the Express Steps
- If you require detailed guidance in how to deploy a CloudFormation stack, then use the Guided Steps
1.1 Log into the AWS console
If you are attending an in-person workshop and were provided with an AWS account by the instructor:
Click here for instructions to access your assigned AWS account:
Go to https://dashboard.eventengine.run/login
Enter the 16 character hashcode you were provided and click “Proceed”

Sign-in using either an Amazon.com retail account or a One-Time Password (OTP) that will be emailed to you.

[optional] assign a name to your account (this is referred to as “Team name”)
- click “Set Team Name”
- Enter a name and click “Set Team Name”
Click “AWS Console”

Get and store your AWS credentials
Access the AWS console
- Click “Open AWS Console”.
- The AWS Console will open and you can continue the lab.
If you are using your own AWS account:
Click here for instructions to use your own AWS account:
- Sign in to the AWS Management Console as an IAM user who has PowerUserAccess or AdministratorAccess permissions, to ensure successful execution of this lab.
1.2 Deploy the VPC infrastructure
Choose either the Express Steps or Guided Steps
- In the AWS Console, choose the AWS region you wish to use - if possible we recommend using us-east-2 (Ohio)
Express Steps (Deploy the VPC infrastructure)
- Download the vpc-alb-app-db.yaml CloudFormation template
- Deploy the CloudFormation template
- Name the stack
WebApp1-VPC
(case sensitive) - Leave all CloudFormation Parameters at their default values
- When the stack status is CREATE_COMPLETE, you can continue to the next step
Guided Steps (Deploy the VPC infrastructure)
Click here for detailed instructions to deploy the VPC:
This step will create the VPC and all components using the example CloudFormation template.
- Download the latest version of the CloudFormation template here: vpc-alb-app-db.yaml
- Sign in to the AWS Management Console, select your preferred region, and open the CloudFormation console at https://console.aws.amazon.com/cloudformation/.
- Click Create Stack, then With new resources (standard).

- Click Upload a template file and then click Choose file.

- Choose the CloudFormation template you downloaded in step 1, return to the CloudFormation console page and click Next.
- Enter the following details:
- Stack name: The name of this stack. For this lab, use WebApp1-VPC and match the case.
- Parameters: Parameters may be left as defaults, you can find out more in the description for each.

- At the bottom of the page click Next.
- In this lab, we use tags, which are key-value pairs, that can help you identify your stacks. Enter Owner in the left column which is the key, and your email address in the right column which is the value. We will not use additional permissions or advanced options so click Next. For more information, see Setting AWS CloudFormation Stack Options.
- Review the information for the stack. When you’re satisfied with the configuration, at the bottom of the page check I acknowledge that AWS CloudFormation might create IAM resources with custom names then click Create stack.

After a few minutes the final stack status should change from CREATE_IN_PROGRESS to CREATE_COMPLETE. You can click the refresh button to check on the current status.
You have now created the VPC stack (well actually CloudFormation did it for you).
When the stack status is CREATE_COMPLETE, you can continue to the next step
1.3 Deploy the EC2s and Static WebApp infrastructure
Choose either the Express Steps or Guided Steps
Express Steps (Deploy the EC2s and Static WebApp infrastructure)
- Download the staticwebapp.yaml CloudFormation template
- Choose the same AWS region as you did for the VPC (if you used our recommendation, this is us-east-2 (Ohio))
- Deploy the CloudFormation template
- Name the stack
WebApp1-Static
(case sensitive) - Leave all CloudFormation Parameters at their default values
- When the stack status is CREATE_COMPLETE, you can continue to the next step
Guided Steps (Deploy the EC2s and Static WebApp infrastructure)
Click here for detailed instructions to deploy the WebApp:
Download the latest version of the CloudFormation template here: staticwebapp.yaml
Choose the same AWS region as you did for the VPC (if you used our recommendation, this is us-east-2 (Ohio))
Go to the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation and click Create Stack > With new resources

Leave Prepare template setting as-is
- For Template source select Upload a template file
- Click Choose file and supply the CloudFormation template you downloaded: staticwebapp.yaml

Click Next
For Stack name use WebApp1-Static
Parameters
For Configure stack options we recommend configuring tags, which are key-value pairs, that can help you identify your stacks and the resources they create. For example, enter Owner in the left column which is the key, and your email address in the right column which is the value. We will not use additional permissions or advanced options so click Next. For more information, see Setting AWS CloudFormation Stack Options.
For Review
- Review the contents of the page
- At the bottom of the page, select I acknowledge that AWS CloudFormation might create IAM resources with custom names
- Click Create stack

This will take you to the CloudFormation stack status page, showing the stack creation in progress.
- Click on the Events tab
- Scroll through the listing. It shows the activities performed by CloudFormation (newest events at top), such as starting to create a resource and then completing the resource creation.
- Any errors encountered during the creation of the stack will be listed in this tab.

When it shows status CREATE_COMPLETE, then you are finished with this step.
Website URL
- Go to the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation.
- Wait until WebApp1-Static stack status is CREATE_COMPLETE before proceeding. This should take about four minutes
- Click on the WebApp1-Static stack
- Click on the Outputs tab
- For the Key WebsiteURL copy the value. This is the URL of your test web service
- Save this URL - you will need it later