CodePipeline, CodeBuild and CodeDeploy
Choose the service by responsibility
CodePipeline coordinates actions and stages, CodeBuild runs build and test commands, and CodeDeploy deploys an application revision to supported targets. A pipeline may start from a source change, then run a build, deploy to staging, wait for approval and deploy to production. CodeDeploy supports different deployment types depending on the compute platform; it is not a universal deployment engine. A failed stage must prevent later release actions in the intended pipeline configuration.
A small build specification
This static CodeBuild buildspec 0.2 assumes a reviewed Linux build image containing Python 3 and the supplied test_app.py and package_app.py files. In the offline fixture the commands test the source and build a ZIP; a real pipeline should additionally test the packaged release in staging. CodeBuild itself has not been run. Configure a bounded timeout and a service role with only the required artifact and log permissions. The artifact path must match the generated file. A file can exist after a failed build; check the action result, not just file presence.
version: 0.2phases: build: commands: - python -m unittest test_app - python package_app.pyartifacts: files: - dist/app.zipSource choices and triggers
CodeCommit is an AWS-hosted Git service. Its user-guide history records reopening to new customers on November 25, 2025, after the July 2024 restriction; AWS announced the return on November 24. Some older reference pages still carry the previous warning. GitHub through AWS CodeConnections or GitHub Actions is another option; verify connection and Region support. Choose one intentional trigger per change to avoid duplicate builds. Migrating Git providers also requires checking branch rules, hooks, identities and pipeline connections, not just transferring commits.
Practice: diagnose the stage
A source action succeeds but CodeBuild reports failing tests; do not approve deployment. Inspect the build log and test report, fix the source, then run a new pipeline execution. If staging succeeds but production deployment fails, inspect the deployment and health evidence; do not blindly rebuild. Estimate costs from build minutes, pipeline usage, storage, logs and deployment targets; bound concurrency and retention before enabling triggers.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
CodePipeline, CodeBuild and CodeDeploy — knowledge check
Reason about a safe delivery pipeline using synthetic scenarios.
Which service coordinates source, build and approval actions?
Which service executes buildspec commands?
What must match the generated ZIP path?
Two triggers start identical builds. What is a suitable correction?
A team is considering CodeCommit for a new account. What does its November 2025 service history say?