AWS CodePipeline
Automated CI/CD pipelines
Orchestrates release processes through stages (source, build, test, deploy, manual approval), runs automatically whenever code changes, and calls CodeBuild, CodeDeploy, CloudFormation, or other services at each step.
- Cost$ Low
- Difficulty●●●●●
- Costs money when idle?A little
- Serverless
- In examsDVA · SOA · SAA
Think of it asLike a factory conveyor belt: products pass through each inspection station in turn, and if one station finds a defect, it stops there.
When to use it
✓ Use it when
You want to automate the entire flow from commit to production right inside AWS.
✗ Avoid it when
The team has already standardized CI/CD on GitHub Actions/GitLab CI and doesn't need deep AWS integration.
Common uses
- Commit → build → test → deploy to ECS
- Deploy CloudFormation/CDK stacks to multiple environments
- Add a manual approval step before going to production
What does it cost?
- Pricing model: V1 pipelines are charged per active pipeline per month; V2 pipelines are charged per minute of action execution.
This doesn't include the costs of CodeBuild, the S3 artifact store, and services called in each stage.
When the question says automate CI/CD from commit to production, with a manual approval step, choose CodePipeline; for compile and test, CodeBuild; for deploying to EC2, Lambda or ECS (blue/green), CodeDeploy; for infrastructure as code, CloudFormation.
Frequently asked questions
How is CodePipeline different from CodeBuild and CodeDeploy?
CodePipeline orchestrates the whole workflow, organized into stages and actions. CodeBuild is the step that compiles, runs tests and produces artifacts. CodeDeploy is the step that deploys applications to EC2, on-premises, Lambda or ECS. Typically CodePipeline calls CodeBuild and then CodeDeploy, or CloudFormation, ECS or S3 in the deploy stage.
When does a pipeline run and how is data passed between stages?
A pipeline starts on a change in the source (a code repository such as GitHub through a connection, S3, ECR), or via EventBridge, a schedule, or manually. Artifacts between stages are stored in an S3 bucket and can be encrypted with KMS. You can add a manual approval step before production.
Can CodePipeline deploy across accounts or Regions?
Yes. A common setup puts the pipeline in a tools account and deploys to dev, staging and prod accounts using cross-account IAM roles. Actions can also run in another Region, in which case an artifact store is needed in each Region.