After this lesson, you will be able to: Build an AWS-native CI/CD pipeline with CodePipeline, CodeBuild, and CodeDeploy, and know when to reach for it instead of GitHub Actions.
You already know GitHub Actions. AWS also ships its own CI/CD suite, and you will meet it in AWS-heavy shops and on the Developer Associate exam. This lesson covers the three core services, how they wire together, and the honest tradeoff against GitHub Actions.
CodePipeline is the orchestrator: it defines the stages (Source, Build, Deploy) and moves an artifact through them. CodeBuild is the build engine: it runs your build/test commands in a managed container and produces artifacts (think the AWS equivalent of a CI job runner). CodeDeploy handles the release: it pushes a new version to EC2, ECS, or Lambda with rolling, blue/green, or canary strategies and automatic rollback on alarm. Together: CodePipeline calls CodeBuild to build/test, then calls CodeDeploy to release.
buildspec.yml is to CodeBuild what a workflow file is to GitHub Actions: the phases it runs.
# buildspec.yml (read by CodeBuild)version: 0.2phases:install:runtime-versions: { nodejs: 20 }commands: [ npm ci ]pre_build:commands:- npm run lint- npm testbuild:commands:- npm run build- docker build -t $REPO_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION .post_build:commands:- aws ecr get-login-password | docker login --username AWS --password-stdin $REPO_URI- docker push $REPO_URI:$CODEBUILD_RESOLVED_SOURCE_VERSIONartifacts:files: [ imagedefinitions.json ] # handed to CodeDeploy / ECS
A typical CodePipeline for a containerized app.
Source: triggered by a commit to CodeCommit or a connected GitHub repo; outputs the source artifact.
Build: CodeBuild runs buildspec.yml (lint, test, build, push image), outputs imagedefinitions.json.
Deploy: CodeDeploy (or an ECS deploy action) rolls the new image out with your chosen strategy.
Approval (optional): a manual-approval stage gates production until someone clicks approve.
Rollback: CodeDeploy auto-rolls-back if a CloudWatch alarm fires during the deploy.
Pick the right service.
Sign in and purchase access to unlock this lesson.