Courseiva
SDLC Automation →hardMultiple Select

DOP-C02 SDLC Automation Practice Question

A company uses AWS CodePipeline with a source stage from Amazon S3. The pipeline deploys a static website to an S3 bucket. The deployment must ensure that the website is always available and that rollbacks happen automatically if the deployment fails. Which TWO actions should the company take?

⚠ Common exam trap

Many candidates confuse S3 bucket versioning (Option E) with a deployment rollback strategy, but versioning only provides object-level version history and does not automate traffic switching or infrastructure rollback on failure.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use a blue/green deployment strategy with two S3 buckets

A blue/green deployment strategy with two S3 buckets allows the company to maintain the current (blue) bucket serving the live website while deploying the new version to a separate (green) bucket. This ensures zero-downtime deployments and, if the deployment fails, traffic can simply remain pointed to the blue bucket, providing an automatic rollback without any manual intervention. Option D is correct because AWS CloudFormation can be configured with automatic rollback on failure, which will revert the stack to its last known good state if the deployment fails, ensuring the website remains available.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Use Amazon Route53 weighted routing to shift traffic

    Why it's wrong here

    Amazon Route 53 weighted routing can distribute traffic between two endpoints, but it is purely a DNS-level traffic control mechanism. It does not integrate natively with CodePipeline to automatically validate a new version or trigger a rollback if errors occur; shifting traffic back requires manual DNS changes. For zero-downtime deployment and automatic rollback, you need an orchestrated deployment strategy rather than just adjusting routing policies.

  • ✗

    Use AWS CodeDeploy with an in-place deployment

    Why it's wrong here

    An in-place deployment with AWS CodeDeploy updates the existing compute instances by replacing the application version on each instance. This approach can cause downtime or reduced capacity because instances are taken out of service during the update, and rolling back requires re-deploying the previous application version. CodeDeploy does support automated rollback triggers, but the in-place model itself does not provide instant switching to a prior version, making it less suitable for a zero-downtime requirement.

  • ✓

    Use a blue/green deployment strategy with two S3 buckets

    Why this is correct

    A blue/green deployment strategy with two S3 buckets allows you to host both the current (blue) and new (green) versions of your application or static assets in separate buckets. You validate the green version in production, then switch routing (e.g., via Route 53 or CloudFront) from blue to green, ensuring zero downtime. If issues arise after the switch, changing the routing back to the blue bucket provides an immediate rollback.

  • ✓

    Configure AWS CloudFormation stack with automatic rollback on failure

    Why this is correct

    Configuring AWS CloudFormation with automatic rollback on failure creates a robust infrastructure-as-code deployment where any stack update that fails health checks or resource creation is automatically rolled back to the previous template state. This built-in rollback ensures that infrastructure changes are reverted without manual intervention, providing a safety net for application deployments. It does not, however, manage traffic switching between versions, so it complements but does not replace a blue/green strategy.

  • ✗

    Enable S3 bucket versioning to keep multiple versions

    Why it's wrong here

    S3 bucket versioning retains multiple versions of an object, allowing you to restore a previous artifact from the bucket. However, versioning alone does not manage compute resources or route traffic; it only serves as a data-store rollback capability. To achieve zero-downtime deployment, you must combine versioning with an orchestrated deployment and traffic-shifting mechanism like blue/green, not rely on it as a standalone strategy.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.