Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
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).
If you are attending an in-person workshop and were provided with an AWS account by the instructor:
If you are using your own AWS account:
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 Create the “deployment machine” .
If you are using your own AWS account: Follow these steps , and then return here and resume with the following instructions.
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
Decide which deployment option you will use for this lab. It can be run as single region or multi region (two region) deployment.
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:”
Leave “Prepare template” setting as-is
Click the “Next” button. For “Stack name” enter:
DeployResiliencyWorkshop
On the same screen, for “Parameters” enter the appropriate values:
Click the “Next” 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 you are finished with this step.
Go to the AWS Step Function console at https://console.aws.amazon.com/states
On the Step Functions dashboard, you will see “State Machines” and you will have a new one named “DeploymentMachine-random characters.” Click on that state machine. This will bring up an execution console. Click on the “Start execution” button.
On the “New execution” dialog, for “Enter an execution name” delete the auto-generated name and replace it with: BuildResiliency
Then for “Input” enter JSON that will be used to supply parameter values to the Lambdas in the workflow.
single region uses the following values:
{
"log_level": "DEBUG",
"region_name": "us-east-2",
"cfn_region": "us-east-2",
"cfn_bucket": "aws-well-architected-labs-ohio",
"folder": "Reliability/",
"workshop": "300-ResiliencyofEC2RDSandS3",
"boot_bucket": "aws-well-architected-labs-ohio",
"boot_prefix": "Reliability/",
"websiteimage" : "https://aws-well-architected-labs-ohio.s3.us-east-2.amazonaws.com/images/Cirque_of_the_Towers.jpg"
}
multi region uses the values here
Note: for websiteimage
you can supply an alternate link to a public-read-only image in an S3 bucket you control. This will allow you to run S3 resiliency tests as part of the lab
Then click the “Start Execution” button.
The “deployment machine” is now deploying the infrastructure and service you will use for resiliency testing.
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 |
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
.
Note: If you are in a workshop, the instructor will share background and technical information while your service is deployed.
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.
Go to the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation.
WebServersforResiliencyTesting
stackWebSiteURL
copy the value. This is the URL of your test web service.
Click the value and it will bring up the website:
(image will vary depending on what you supplied for websiteimage
)
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool