On this page
On this page
- Overview
- CodeCommit
- Authentication โ All Roads Lead to IAM
- Reacting to Repository Events โ Three Mechanisms
- Pull Request Governance
- Branch Protection = IAM Conditions
- CodePipeline
- Pipeline Trigger Methods โ Events vs. Webhooks vs. Polling
- CodeConnections (formerly CodeStar Connections)
- Deploy-Stage Actions โ The Full Menu
- Cross-Account and Multi-Region Deployments
- Parallel Actions and Stages
- Pipeline Variables
- Artifact Encryption
- CodeBuild
- Caching Strategies
- Batch Builds
- Sample buildspec.yml
- CodeDeploy
- buildspec.yml vs appspec.yml vs template.yml
- EC2 Deployment Strategies (In-Place)
- Blue-Green Deployment (EC2)
- Lambda Deployment Strategies
- ECS Deployment Strategies
- ALB / Load Balancer Integration
- CodeDeploy โ On-Premises Servers
- CodeDeploy โ Deployment Configuration Details
- CodeArtifact
- CodeArtifact โ Resource Policies and Cross-Account Access
- CodeArtifact โ Upstream Repository Precedence
- CodeGuru
- CodeGuru Reviewer
- CodeGuru Profiler
- EC2 Image Builder
- ECR (Elastic Container Registry)
- ECR Scanning โ Basic vs Enhanced
- Amplify
- Elastic Beanstalk
- Environment Tiers
- Deployment Policies
- .ebextensions
- Environment Configuration
- Application Versions & Lifecycle Policy
- RDS Integration
- Beanstalk + CodePipeline
- Key CLI Commands
- Elastic Beanstalk vs CodeDeploy
- SAM (Serverless Application Model)
- SAM Resource Types (shorthand that SAM expands to CloudFormation)
- SAM CLI Key Commands
- SAM Deployment Internals
- SAM + CodeDeploy (Traffic Shifting)
- Testing Strategies in CI/CD Pipelines
- Test Types and Pipeline Placement
- Canary Testing Pattern
- Test Reporting in CodeBuild
- Key Exam Scenarios
- CloudWatch Integration
- CodeBuild (AWS/CodeBuild namespace โ automatically published)
- CodeDeploy (AWS/CodeDeploy namespace โ automatically published)
- CodePipeline (AWS/CodePipeline namespace โ automatically published)
- Requires Setup
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.
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.