📋 CI/CD on AWS Cheat Sheet

Master AWS CI/CD services for the DVA-C02 exam — pipeline stages, buildspec, appspec, deployment strategies, and artifact management.

CodePipeline

  • Source stage: CodeCommit, S3, GitHub, Bitbucket, ECR.
  • Build stage: CodeBuild, Jenkins. Test: CodeBuild, third-party.
  • Deploy stage: CodeDeploy, CloudFormation, ECS, S3, Elastic Beanstalk.
  • Artifacts are stored in S3 and passed between stages.
  • Manual approval actions enable gate-based workflows.

CodeBuild

  • buildspec.yml defines phases: install, pre_build, build, post_build.
  • Environment variables can come from the build project, buildspec, or Secrets Manager/Parameter Store.
  • Build caching (S3 or local) speeds up subsequent builds.
  • Reports: test reports (JUnit, NUnit, Cucumber) and code coverage reports.

CodeDeploy

  • appspec.yml (EC2/on-premises) or appspec.yaml (Lambda/ECS) defines deployment instructions.
  • EC2/on-premises: in-place or blue/green deployments. Lifecycle hooks: BeforeInstall, AfterInstall, ApplicationStart, ValidateService.
  • Lambda: all-at-once, canary, or linear traffic shifting using aliases.
  • ECS: blue/green with replacement task set. Traffic shifts via ALB listener rules.
  • Automatic rollback on deployment failure or CloudWatch alarm triggers.

SAM & CloudFormation

  • sam build: compiles dependencies. sam package: uploads to S3. sam deploy: creates/updates a CloudFormation stack.
  • SAM transforms AWS::Serverless::Function → Lambda + IAM Role + API Gateway (if Events defined).
  • sam local invoke/start-api enables local testing of Lambda functions.
  • CloudFormation change sets preview stack modifications before execution.

Practice CodePipeline, CodeBuild, CodeDeploy Questions

Put your knowledge to the test with practice questions.

More DVA-C02 Cheat Sheets