Run A Controlled Deploy With AWS Elastic Beanstalk
2202 students completed the lab in ~1h:15m
Total available time: 2h:6m
960+ students rated this lab!
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. We can minimize deployment risk by studying a couple of common approaches to porting code into machines running!
This Lab covers:
- How to build an Elastic Beanstalk Application container and environments
- The efficient way to perform a rolling deployment on underlying EC2 resources
- Blue-Green deployment with Elastic Beanstalk for zero-downtime launches
- How to mitigate cost by validating cleanup after immutable or blue-green deploys
During this lab, you will walk deployment of a new load balanced, auto scaling Todo application into an AWS VPC, upgrade the code of your app to version 2 using low-friction and rapid rolling deployment, construct a secondary deployment stack, upgrade the secondary for use as the primary, swap the environments with no downtime, and clean up the older versions of code to save money on resources.
Note: AWS Elastic Beanstalk is moving to a new UI. This Lab was built and tested using the legacy (older) UI. AWS supports both the legacy and newer UI. We recommend using the legacy UI for now when completing this Lab. After you click the Get Started button, you have an option to switch to the legacy UI at the bottom of the page:
Follow these steps to learn by building helpful cloud resources
Logging in to the Amazon Web Services Console
Your first step to start the Lab experience
Create an Elastic Beanstalk App & Environment
To practice controlled deployments with Elastic Beanstalk, we must first create an environment in which we can work. In this step, we build out an Elastic Beanstalk application and environment, then deploy the first version of our code onto it.
Run a Rolling Deploy
Now that we have our first version deployed onto Elastic Beanstalk, we can continue by executing a running deploy on the Elastic Beanstalk environment, upgrading the environment to version 2.
Prepare a Blue-Green Deploy
Having successfully deployed and validated the second version of our code onto infrastructure using the Rolling Deploy technique, we should prepare to try a Blue-Green deploy, by preparing the second running environment.
Do the Deploy Swap
The hardest parts are over. Since the new Green environment has been upgraded itself using a Rolling Deployment, while detached, the Green environment is ready for DNS hotswapping and usage.
Clean Up Old Resources
Since we now are running the latest version, version 3, at the same URL that we originally launched version 1 on, without significant downtime, that's a win. To make it more of a win, we need to save costs by cleaning up after ourselves.