Welcome to Cloud Academy's Lab Guide for our Hands-on Lab Using Amazon ECS for Blue-Green Deployments.
Deploying and maintaining different environments in AWS is a key skill aquire in you cloud computing career. Best practices state you need a staging enviornment and a production enviornment. That way you can test changes in staging before they go live in production for your customers.
In this lab, we walk you through this process.
However, due to the security restrictions we place on this particular lab, you need to be extremely careful on which settings you configure, or else your app won't deploy.
Students' most common error is when they forget that the checkbox for Allow AWS CodeBuild to modify this service role needs to be UNCHECKED. You can see this in my configuration below:
Project name: Enter ecslab-blue-project
Source provider: Select Amazon S3
Bucket: Select bucket starting with cloudacademylabs-caecslab-
S3 object key: Enter ecslabblue.zip
Environment image: Ensure Managed image is selected
Operating system: Select Ubuntu
Runtime: Select Standard
Image: Select aws/codebuild/standard:4.0
Image version: Select Always use the latest image for this runtime version
Service role: Select Existing service role
Role ARN: Select the CodeBuildServiceRole role
Allow AWS CodeBuild to modify this service role...: UNCHECKED
Build specifications: Ensure Use a buildspec file is selected
Buildspec name: Enter buildspec.yml
Type: Ensure No artifacts is selected
You should be able to build the blue project successfully.
It's important to note that this needs to be unchecked more than once! Later in lab, you'll be instructed to go back to edit the environment. After clicking Edit...
1) Uncheck Allows AWS CodeBuild to modify this service role... again
2) Expand Additional configuration, scroll down to Environment variables, and enter the following:
Value: 996526086145 (the student AWS Account ID, this will vary every session, sample ID for my session)
Type: Ensure Plaintext is selected
3) Click update environment.
4) Click Start build, and this should let you build the project:
Knowing this, you should be able to complete the lab.
If you have any additional questions or concerns, please email firstname.lastname@example.org