Run a Controlled Deploy With AWS Elastic Beanstalk
Description
Lab Overview
One of the highest risk parts of running a software company, in terms of availability concerns, is the risk of a faulty deployment. During deployments, complex systems with multiple parts are actively moving around the delicate parts of many other systems. Deployment risk can be minimized by studying a couple of common approaches to deploying code to running machines.
In this lab, you will deploy multiple version updates of an application in a load-balanced and auto-scaled environment. The first update is deployed using a simple, low-friction rolling deployment. The second update is deployed using a blue-green deployment where a separate environment is created to run the new version of the application and a DNS cutover switches incoming traffic to the new environment.
Lab Objectives
Upon completion of this lab, you will be able to:
- Build Elastic Beanstalk applications and environments
- Perform rolling deployments on underlying EC2 resources
- Perform blue-green deployments with Elastic Beanstalk for zero-downtime updates
- Minimize costs by cleaning up after blue-green deploys
Lab Prerequisites
You should be familiar with:
- Basic Amazon EC2 and Virtual Private Cloud (VPC) concepts
- The topics covered in the Advanced Deployment Techniques on AWS course are beneficial, but not required
Lab Environment
Before completing the lab instructions, the environment will look as follows:
After completing the lab instructions, the environment should look similar to:
Updates
April 25th, 2023 - Updated the instructions and screenshot to reflect the latest UI
April 21st, 2023 - Resolved Elastic Beanstalk app creation error
April 5th, 2023 - Added note regarding todo notes
March 27th, 2023 - Resolved Elastic Beanstalk app & environment creation error
March 6th, 2023 - Updated network settings for AWS Elastic Beanstalk application
January 19th, 2023 - Added screenshot to support instructions
July 18th, 2022 - Updated the instructions and screenshots to reflect the latest UI
June 23rd, 2021 - Provided warning label for EB application creation lab step and updated any ambiguous screenshot associated
May 10th, 2021 - Resolved an issue where the AWS console stalled creating the Elastic Beanstalk service role
February 12th. 2021 - Updated the lab to resolve a permission issue
February 9th, 2021 - Added lab step explaining cost considerations
January 29th, 2021 - Update instructions to handle options being greyed out until page is refreshed
June 1st, 2020 - Fix an issue causing v3 of the app to fail to deploy correctly
May 29th, 2020 - Updated some screenshots to account for an updated Beanstalk UI
May 26th, 2020 - Updated the Node.js deployment packages to allow for successful deployments to AWS Beanstalk
April 10th, 2020 - Updated the instructions and screenshots due to the new Elastic Beanstalk UI
October 17th, 2019 - Updated the creation of the environment instructions
July 19th, 2019 - Improved the validation lab Step to further check the work you perform in the lab
January 10th, 2019 - Added a validation lab Step to check the work you perform in the lab
October 17th, 2018 - Adapted the lab to use an Application Load Balancer (the new default) rather than a Classic Load Balancer
September 6th, 2018 - Improved instructions clarity and updated screenshots to the most recent Elastic Beanstalk interface
April 29th, 2018 - Complete update (easier to follow instructions and screenshots for the new Elastic Beanstalk UI)