AWSDOP-C02
On this page
Practice questions (148) โ†’

On this page

Beginner-friendly overview

SDLC

AWS's CI/CD suite automates the journey from code commit to production deployment. CodePipeline orchestrates the overall workflow, CodeBuild compiles and tests code, and CodeDeploy handles the actual deployment to your servers or services.

CodePipeline โ€” orchestrates (conductor) Source GitHub / S3 / ECR CodeBuild compile ยท test ยท package S3 stores built artifact CodeDeploy โ†’ EC2 / Lambda / ECS CodeArtifact npm ยท pip ยท Maven deps fetch deps CloudFormation provisions infra targets creates targets

What CI/CD Means

Continuous Integration (CI) means every code change is automatically built and tested as soon as it's pushed. Problems are caught immediately, before they compound. Developers get fast feedback without manually running the full test suite.

Continuous Deployment (CD) means code that passes all tests is automatically deployed to production (or staging). There's no manual "click to deploy" step โ€” the pipeline handles it. Deployments become routine, low-risk events rather than infrequent, high-stress releases.

CodePipeline

CodePipeline is the orchestrator. You define a pipeline as a series of stages (Source, Build, Test, Deploy) and the actions within each stage. When code is pushed to your repository, the pipeline triggers automatically, runs each stage in sequence, and stops if any action fails.

A pipeline can pull source code from CodeCommit, GitHub, Bitbucket, or S3. Each subsequent stage receives the artifacts produced by the previous one.

CodeBuild

CodeBuild runs the build โ€” compiling code, running unit tests, producing a deployable artifact (a JAR file, a Docker image, a ZIP file). It runs in an ephemeral container that starts fresh for each build, so there's no "works on my machine" problem and no accumulated state from previous builds.

You configure a build with a buildspec.yml file in your repository that defines the install, pre-build, build, and post-build phases.

CodeDeploy

CodeDeploy deploys your artifact to the target โ€” EC2 instances, Auto Scaling groups, ECS services, or Lambda functions. It handles the deployment strategy:

In-place โ€” update the application on existing EC2 instances in batches, reducing capacity temporarily but avoiding the cost of new instances.

Blue/green โ€” launch new instances with the new version, shift traffic when they pass health checks, then terminate the old instances. Zero downtime and instant rollback (just shift traffic back).

The Bigger Picture

Many teams use these services through higher-level abstractions: CDK Pipelines (which generates CodePipeline configuration from CDK code) or GitHub Actions with the AWS CLI. Understanding what each service does helps you configure and troubleshoot those abstractions when things go wrong.