Domain 3 of 4 · Chapter 4 of 4

CI/CD Deployment

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing AWS Certified Developer - Associate premium course — no separate purchase.

Included in this chapter:

  • One model: a pipeline is stages of actions passing artifacts
  • The build stage: CodeBuild and buildspec.yml
  • The deploy stage: CodeDeploy, AppSpec, and deployment types
  • Supporting services and exam-pattern recognition

CodePipeline vs CodeBuild vs CodeDeploy: who does what

DimensionAWS CodePipelineAWS CodeBuildAWS CodeDeploy
Role in CI/CDOrchestrator: sequences stages and moves artifactsBuild/test: compiles and packages sourceRelease: installs/shifts the built artifact onto compute
Config file it readsPipeline definition (stages, actions, runOrder)buildspec.yml (install/pre_build/build/post_build)AppSpec file (appspec.yml/.yaml or JSON)
Primary inputSource-change revision (commit or tag)Source artifact + dependenciesBuilt artifact + AppSpec revision
Primary outputAn executed release workflowOutput artifact(s) to the S3 artifact storeDeployed/traffic-shifted application version
Targets / platformsAny action provider (build, test, deploy, approval, invoke)Managed build containers (Linux/Windows runtimes)EC2/on-premises, AWS Lambda, Amazon ECS
Deployment strategies it controlsStage gates, manual approval, automatic stage rollbackNone (build only)In-place (EC2 only) and blue/green; canary/linear/all-at-once shift

Decision tree

Which AWS Code* service does the task name? Sequence ordered stages and move artifacts between them? Yes — orchestrate No — one task; ask its verb CodePipeline stages, runOrder, manual approval What does the single action do to the application artifact? compile / test / package install / shift onto compute store / serve packages CodeBuild reads buildspec.yml; emits output artifact to S3 CodeDeploy reads AppSpec; in-place (EC2) or blue/green (Lambda, ECS) CodeArtifact npm / pip / Maven / NuGet repo; proxies public registries Need a versioned source revision (a commit or tag) to feed the chain? Where does the source repo live? a source change is what triggers the pipeline AWS first-party Git GitHub / GitLab / Bitbucket CodeCommit legacy first-party Git host CodeConnections integrates third-party Git sources

Cheat sheet

  • A CodePipeline pipeline is ordered stages of actions that pass artifacts
  • CodePipeline action categories are a fixed vocabulary the exam maps to services
  • Pipelines exchange files through an S3 artifact store, not direct copies
  • A source change starts a pipeline; an EventBridge rule beats polling
  • Use a manual approval action to pause a pipeline for sign-off
  • CodePipeline runs under IAM service roles, not as a user
  • CodeBuild compiles, tests, and packages with no build servers to manage
  • buildspec.yml lives at the source root by default
  • CodeBuild runs four build phases strictly in order
  • Pull build secrets from Secrets Manager or Parameter Store, never plaintext env vars
  • Enable CodeBuild caching when builds re-download the same dependencies
  • CodeDeploy deploys a built artifact onto compute and never compiles
  • The AppSpec file manages a CodeDeploy deployment as lifecycle event hooks
  • The Lambda/ECS AppSpec may be YAML or JSON and names a version to deploy
  • The CodeDeploy agent is required only for EC2/on-premises deployments
  • The source action reads a versioned Git revision, so branches and tags drive releases
  • Connect GitHub, GitLab, or Bitbucket sources through CodeConnections
  • Know the CodeDeploy EC2 in-place lifecycle event order
  • CodeDeploy's ApplicationStop runs scripts from the PREVIOUS revision, so it is skipped on a new instance
  • CodeDeploy only fails a lifecycle hook when its script returns a non-zero exit code
  • A CodePipeline Lambda invoke action must call PutJobSuccessResult or PutJobFailureResult
  • CodeCommit triggers: event types, no FIFO SNS, and the Lambda resource policy
  • Use a buildspec reports section to surface test results in the CodeBuild console

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. What is AWS CodePipeline?
  2. Input and output artifacts (CodePipeline)
  3. CodePipeline pipeline structure reference
  4. What is AWS CodeBuild?
  5. What is CodeDeploy?
  6. Start a pipeline in CodePipeline
  7. Manage the CodePipeline service role
  8. Build specification reference for CodeBuild
  9. Build caching in CodeBuild
  10. CodeDeploy application specification (AppSpec) files
  11. Working with the CodeDeploy agent
  12. Working with deployments in CodeDeploy
  13. Deployment configurations in CodeDeploy
  14. What is CodeArtifact?
  15. Connections in the Developer Tools console (CodeConnections)