Deploy the Infrastructure and Application
You will create a multi-tier architecture using AWS and run a simple service on it. The service is a web server running on Amazon EC2 fronted by an Elastic Load Balancer reverse-proxy, with a data store on Amazon Relational Database Service (RDS).

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.
- You will need the AWS credentials,
AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
, of this IAM user for later use in this lab.
Decide which deployment option you will use for this lab. It can be run as single region or multi region (two region) deployment. If you are attending an in-person workshop, use single region
In later steps choose the appropriate instructions for the deployment option you you have decided upon.
- single region is faster to get up and running
- multi region enables you to test some additional aspects of cross-regional resilience.
If you are attending an in-person workshop, then please continue to Step 2 now.
1.2 Checking for existing service-linked roles
If you are attending an in-person workshop and were provided with an AWS account by the instructor:
Skip this step and go directly to step 2. Configure Execution Environment.
If you are using your own AWS account:
Follow these steps, and then return here and resume with the following instructions.
1.3 Deploy infrastructure and run the service
If you are attending an in-person workshop and were provided with an AWS account by the instructor:
Skip this step and go directly to step 2. Configure Execution Environment.
If you are using your own AWS account
Click here for instructions on creating the deployment machine
Here you will build a state machine using AWS Step Functions and AWS Lambda that orchestrates the deployment of the multi-tier infrastructure. This is not the service infrastructure itself, but meta-infrastructure we use to build the actual infrastructure.
Learn more: After the lab see this blog post on how AWS Step Functions and AWS CodePipelines can work together to deploy your infrastructure
Get the CloudFormation template: Download the appropriate file (You can right-click then choose download; or you can right click and copy the link to use with wget
)
Ensure you have selected the Ohio region. This region is also known as us-east-2, which you will see referenced throughout this lab.

Go to the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation and click Create Stack and select With new resources from the drop-down menu

Leave “Prepare template” setting as-is
- 1 - For “Template source” select “Upload a template file”
- 2 - Specify the CloudFormation template you downloaded

Click the “Next” button. For “Stack name” enter: DeployResiliencyWorkshop

On the same screen, for “Parameters” enter the appropriate values:
Click the “Next” button.
- On the “Configure stack options” page, click “Next” again
- On the “Review DeployResiliencyWorkshop” page, scroll to the bottom and tick the checkbox “I acknowledge that AWS CloudFormation might create IAM resources with custome names.”
- Click the “Create stack” button.

This will take you to the CloudFormation stack status page, showing the stack creation in progress.

This will take approximately a minute to deploy. When it shows status CREATE_COMPLETE
, then the state machine will start deploying the infrastructure and service.
Once the “deployment machine” starts deploying the infrastructure and service it will take approximately the following times to deploy:
Time until you can start… | Single region | Multi region |
---|
EC2 failure injection test | 15-20 min | 15-20 min |
RDS and AZ failure injection tests | 20-25 min | 40-45 min |
Multi-region failure injection tests | NA | 50-55 min |
Total deployment time | 20-25 min | 50-55 min |
To save time, you can move on to Step 2 now while the application is deploying.
1.4 Monitoring progress of the deployment
Click here for instructions on monitoring the progress of the deployment
Go to the AWS Step Function console at https://console.aws.amazon.com/states
On the Step Functions dashboard, you will see “State Machines”. Click on the one named “DeploymentMachine-random characters.” This will bring up an execution console
Click on the state machine execution under Executions
You can watch the state machine as it executes by clicking the icon to expand the visual workflow to the full screen.

You can also watch the CloudFormation stacks as they are created and transition from CREATE_IN_PROGRESS
to CREATE_COMPLETE
.

You can start the first test (EC2 failure injection testing) when the web tier has been deployed in the Ohio region. Look for the WaitForWebApp
step (for single region) or WaitForWebApp1
step (for multi region) to have completed successfully. This will look something like this on the visual workflow.

1.5 View website deployed as part of this test application