hands-on lab

Continuous Integration and Deployment with AWS Code Services

Difficulty: Advanced
Duration: Up to 4 hours
Students: 6,903
Rating: 4.5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

AWS Code Services provides all the tools you need to deliver software following DevOps practices. The services under the AWS Code Services umbrella that you will work within this lab are:

  • CodePipeline - A service for fast and reliable continuous integration (CI) and continuous delivery (CD)
  • CodeBuild - A scalable service to compile, test, and package source code
  • CodeDeploy - A service to automate code deployments anywhere

You will work with each service as you deploy an application. You will also get experience handling rollbacks in a blue/green deployment environment when a release goes awry.

Learning objectives

Upon completion of this advanced-level lab, you will be able to:

  • Create and use Git repositories for source control
  • Build and test your code with AWS CodeBuild
  • Automate your CI/CD process with AWS CodePipeline
  • Use AWS CodeDeploy to automate your deployments to EC2
  • Release and roll back using a blue/green deployment strategy

Prerequisites

You should be familiar with the following:

  • Using EC2 instances
  • Elastic Load Balancers
  • Working on the command line in Linux
  • Issuing Git commands and version control workflows will be helpful but not required

The following content can be used to fulfill the prerequisites:

Environment

Before completing the lab instructions the environment will look as follows:

After completing the lab instructions the environment should look similar to:

Updates

November 12th, 2024 - Replaced deprecated CodeCommit with a self-hosted Git source control management system

July 8th, 2024 - Updated the instructions to reflect the latest UI

January 29th, 2024 - Resolved an issue that would cause lab setup to fail on rare occasions

November 27th, 2023 - Updated the instructions and screenshots to reflect the latest UI

October 10th, 2023 - Resolved Node.js issue

March 13th, 2023 - Updated lab to use an application load balancer

February 21st, 2023 - Updated lab to use aws/codebuild/standard:6.0 image

October 23rd, 2021 - Improved Git clone instruction to avoid errors

December 24th, 2020 - Updated the lab to use EC2 instance connect for SSH

July 30th, 2020 - Updated package.json in the versioned commits

July 7th, 2020 - Updated the gulp file in the app to address an issue

January 13th, 2020 - Updated source code package dependencies to support upgrading to Node.js 12

May 24th, 2019 - Updated Lab to use the new CodeBuild standard Ubuntu build image, and updated screenshots to match the latest Console experience

January 10th, 2019 - Added a validation Lab Step to check the work you perform in the Lab

October 17th, 2018 - Updated images and instructions for compatibility with the new AWS UI

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Committing Code to a Git Repository
Building and Testing with AWS CodeBuild
Deploying with AWS CodeDeploy
Automating Your Deployment with AWS CodePipeline
Following the Continuous Deployment Pipeline
Recovering Automatically from a Failed Deployment
Using AWS CodeDeploy Blue/Green Deployments in Your Pipeline