Skip to main content
Good morning, students. This lesson is a concise refresher for Domain 1 (SDLC automation). Domain 1 is the largest single domain on the exam (about 22% of questions, ~14–15 items) and focuses on automating the software delivery lifecycle. If any term or concept below is unfamiliar, pause and review the detailed lessons in the series — everything summarized here was covered previously.
A presentation slide titled "Domain 1 at a Glance" with four labeled boxes summarizing the domain's points. The boxes note: Largest Domain (22% of exam, 14–15 questions), 4 Task Statements (CI/CD pipelines, testing integration, artifact management, deployment strategies), Core Theme (automate the software delivery lifecycle), and AWS Native Services (CodeCommit → CodeBuild → CodeDeploy → CodePipeline).

CI/CD pipeline fundamentals

Core concept: pipelines orchestrate the flow from source through build, test, artifact storage, and deployment. Recognize the AWS-native orchestration and how pieces integrate.
  • AWS CodePipeline is the orchestration service. Typical flow: source (e.g., CodeCommit) → CodeBuild (build/test) → artifact storage (S3/ECR/CodeArtifact) → CodeDeploy (or other deployment actions).
  • Artifacts from CodeBuild can be stored in S3 for static outputs, in ECR for container images, or in CodeArtifact for packages. Pipelines can operate across single-account or multi-account topologies — understand cross-account IAM roles, trust policies, and how AWS Organizations affect CI/CD design.
  • Webhooks, service roles, and scoped permissions (least privilege) are essential to a secure, reliable pipeline.
A presentation slide titled "CI/CD Pipeline Fundamentals" with a "Service Roles" label. Four purple AWS service icons are shown left to right: AWS CodePipeline, AWS CodeCommit, AWS CodeBuild, and AWS CodeDeploy.

CodeBuild and buildspec

CodeBuild executes the build and test commands you specify in a buildspec.yml. The buildspec lays out named phases and artifacts that control the build lifecycle.
  • Named phases: install, pre_build, build, post_build.
  • Artifacts: specify what to upload to S3 (or other configured sinks).
  • Additional concerns: caching for speed, test reports integration, and secure secrets/parameter access.
A minimal example buildspec.yml to illustrate typical sections:
  • Never store database credentials or long-lived secrets directly in plaintext environment variables. Inject secrets at build time using secure stores (see Secrets Management below) and grant minimal IAM permissions to the CodeBuild service role.
Prefer AWS Secrets Manager when you require automatic secret rotation and native integrations. Use Systems Manager Parameter Store (standard tier) for lower-cost, non-rotating configuration values; use the advanced tier only when you need its features.
A presentation slide titled "Buildspec.yml – The Heart of CodeBuild" showing a vertical flowchart of build phases (INSTALL, PRE_BUILD, BUILD, POST_BUILD, UPLOAD_ARTIFACTS, FINALIZING, COMPLETED). To the right is a highlighted box listing critical sections to master: Artifacts, Reports, Cache, and Secrets integration.

Secrets management: Secrets Manager vs Parameter Store

Choose the right secret store based on rotation needs, integration, and cost.
  • AWS Secrets Manager: automatic rotation, native integrations (e.g., RDS), secure storage for credentials and API keys; comes with additional cost.
  • AWS Systems Manager Parameter Store: standard tier is free with limits, advanced tier charges apply; does not provide automatic rotation out of the box (you can implement custom rotation workflows).
A slide titled "Secrets Management Quick Reference" comparing AWS Secrets Manager and AWS Systems Manager Parameter Store with four numbered points about rotation, integrations, costs, and recommended uses. The left column describes Secrets Manager features (automatic rotation, RDS/Redshift integration, pricing, use for credentials) and the right column lists Parameter Store details (free standard tier, advanced pricing, no rotation, use for config/non-sensitive data).

Automated testing in pipelines

Place tests in the pipeline according to speed and scope. Ensure build steps return correct exit codes so pipeline stages fail or pass deterministically. Table: Test levels, cadence, where to place Configure test runners and scripts so they propagate proper exit codes and provide helpful test reports.
A slide titled "Automated Testing in Pipelines" showing a colorful test-pyramid labeled bottom-to-top with Security Tests, Performance Tests, Functional Tests, Integration Tests, and Unit Tests. A footer note mentions configuring buildspecs to return proper exit codes for application health.

Artifact management

Map artifact types to appropriate AWS services and design retention/versioning strategies. You can host custom repositories if organizational policy requires it. Consider lifecycle policies and immutability/version schemes to make rollbacks predictable.
A slide titled "Artifact Management Essentials" showing a diagram of artifact types and their AWS services. It maps Pipeline outputs (S3), Container images (ECR), A1MIs (EC2), and npm/Maven/PyPI packages (CodeArtifact).

Deployment strategies

Understand trade-offs between speed, risk, and rollback simplicity. Select strategies that support monitoring and automated rollbacks. Use ALB/traffic shifting or service mesh routing to control traffic during deployments.
A slide titled "Deployment Strategies Overview" showing four deployment types: All-at-Once, Rolling, Blue/Green, and Canary. Each box notes downtime and rollback: All-at-Once (Downtime: Yes, Rollback: Redeploy); Rolling (Downtime: Minimal, Rollback: Slow); Blue/Green and Canary (Downtime: Zero, Rollback: Instant).

CodeDeploy and compute targets

CodeDeploy adapts behavior per compute target — know the options and where lifecycle hooks fit.
  • EC2 / On-premises: supports in-place (mutable) updates and batched deployments. Use appspec.yml to define lifecycle hooks that run on instance-level events.
  • ECS: supports blue/green and traffic shifting via ALB and new task sets (immutable deployments). Use task definitions and CodeDeploy integration for controlled cutovers.
  • EKS: typically use Kubernetes-native deployments or tools such as Argo Rollouts / Istio for progressive delivery — CodeDeploy integration is not the primary Kubernetes pattern.
  • Lambda: uses versions and aliases; supports linear/canary traffic shifting and pre/post-traffic hooks.
Blue/green requires distinct environments and a routing mechanism (ALB, Route 53, or similar) to switch traffic, enabling quick rollback by repointing.
A presentation slide titled "CodeDeploy Configurations by Compute" showing three columns for EC2, ECR, and Lambda, each with an icon and deployment notes. The bullets cover blue/green requirements, appspec.yml hooks and container/task specs, and Lambda versions/aliases plus pre/post-traffic hooks.

Blue/green and traffic shifting

Blue/green creates a parallel (green) environment while the old (blue) remains live. Traffic shifting approaches:
  • All-at-once: single cutover — fast but riskier.
  • Canary: route a small percentage first, verify, then increase.
  • Linear: increment traffic by fixed steps over time.
Use ALB target groups or advanced routing (service mesh) to implement shifts and to make rollbacks trivial (repoint back to blue).
A diagram titled "Blue/Green Deployment Deep Recall" showing a blue (old) ECS environment and a green (new) ECS environment. An ALB (registered by CodeDeploy) shifts traffic between them (all-at-once or gradual) with arrows for rollback/revert and termination of the old environment.

Immutable vs mutable deployments

  • Immutable: replace instances/tasks with new versions. Advantages: no drift, predictable rollbacks, easier testing of images (golden AMIs, container images). Preferred for cloud-native/containerized workloads.
  • Mutable (in-place): patch or update running instances. Advantages: sometimes faster for tiny fixes, but increases risk of drift and inconsistent state.
Favor immutability in production-critical pipelines.

Troubleshooting deployment failures

When a pipeline or deployment fails, follow a focused troubleshooting sequence:
  1. Permissions and roles: verify service roles, cross-account role trusts, bucket policies, and repository permissions.
  2. Logs and diagnostics: examine CloudWatch logs (CodeBuild logs, CodeDeploy agent logs, Lambda logs) and pipeline execution history for detailed error messages.
  3. Networking and health checks: check load balancer health checks and target group configurations — misconfigured health checks are a common cause of rollbacks.
A slide titled "Troubleshooting Deployment Failures" listing three numbered items: CodePipeline, CodeBuild, and CodeDeploy. Each item gives a brief fix — check repository permissions/webhook, review CloudWatch logs, and review ALB target group health checks.

Exam focus and common scenarios

Prepare to reason about:
  • CodePipeline stage roles, parallel/sequential actions, and webhook triggers.
  • CodeBuild lifecycle, buildspec.yml structure, caching, and artifact upload behaviors.
  • CodeDeploy deployment types across EC2, ECS/EKS, and Lambda; know when to use ALB-based traffic shifting.
  • Artifact storage options: S3, ECR, CodeArtifact; retention and versioning strategies.
  • Multi-account CI/CD topologies: cross-account roles, AWS Organizations, and secure artifact sharing.
  • Secrets and keys: use IAM roles, KMS, Secrets Manager or Parameter Store appropriately.
  • Immutable infrastructure patterns (golden AMIs, image pipelines) and zero-downtime release design.
A slide titled "Domain 1 Exam Triggers – Final Review" showing that this topic is 22% of the exam. It lists must-know services (CodePipeline, CodeBuild, CodeDeploy, ECR/CodeArtifact/S3), deployment patterns (zero-downtime, multi-account, gradual rollout, secrets management, etc.), and common exam scenarios.

Key takeaways

  1. Automation is the core — automate build, test, artifact storage, and deployment consistently.
  2. Consistency reduces risk — prefer immutable infrastructure and golden-image patterns to limit drift.
  3. Safety and security — use IAM roles and KMS for encryption, and inject secrets via Secrets Manager or Parameter Store. Design for testability and zero-downtime rollouts; plan for multi-account CI/CD when needed.
A presentation slide titled "Key Takeaways" with a blue gradient panel on the left. On the right are three numbered points: Automation (software delivery lifecycle), Consistency (immutable infrastructure and golden AMIs), and Safety (IAM roles, KMS encryption, and secrets management).
If anything above was unclear, make a note and revisit detailed materials on that topic. This summary is designed to consolidate Domain 1 concepts so you can focus your review efficiently. Further reading and references:

Watch Video