DOP-C02 SDLC Automation Practice Question
A DevOps team uses AWS CodePipeline to deploy a static website to Amazon S3. The pipeline has a source stage from CodeCommit, a build stage using CodeBuild that generates the website files, and a deploy stage that copies files to an S3 bucket. The team wants to add a manual approval step before the deploy stage. What should the engineer do?
⚠ Common exam trap
Many candidates confuse event-driven automation (SNS, Lambda, S3 events) with the need for a manual approval gate, overlooking that CodePipeline's built-in approval action is the simplest and most direct solution for human-in-the-loop control.
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
✓
Add an approval action in the pipeline stage before deploy
AWS CodePipeline natively supports a manual approval action that can be added as a stage gate. By inserting an approval action in a stage immediately before the deploy stage, the pipeline will pause and require a designated approver to manually approve or reject the deployment, ensuring human oversight before files are copied to the S3 bucket.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add an approval action in the pipeline stage before deploy
Why this is correct
An approval action is a native CodePipeline action type that deliberately pauses the execution at the end of the stage in which it is placed. When the pipeline reaches this action, it transitions to a 'Manual approval required' state and stops executing any subsequent stages, such as the deploy stage, until a user explicitly clicks Approve or Reject. This creates a true sign-off gate and is the only supported way to insert a human decision point directly into the pipeline flow before deployment.
- ✗
Use Amazon SNS to send a notification and rely on a Lambda function to resume
Why it's wrong here
An SNS notification alone cannot pause or resume a CodePipeline execution; the pipeline requires an approval action defined directly in the pipeline structure, which SNS has no mechanism to trigger. This option is tempting because SNS is commonly used with Lambda to automate responses to events, and in other scenarios—such as triggering a custom validation or notification workflow after a build—a Lambda function subscribed to an SNS topic would be the correct choice.
- ✗
Add a CodeBuild action that waits for an SNS confirmation
Why it's wrong here
CodeBuild actions execute a build project to completion; they do not and cannot suspend their own execution to wait for an external SNS confirmation. Even if a build project had code that polled an SNS topic, CodePipeline would see the build as succeeded when the build command exits, and then immediately continue to the next stage, which would bypass the intended approval gate. There is no built-in 'wait for notification' action in CodePipeline, and SNS alone has no mechanism to pause or resume a pipeline execution.
- ✗
Configure the S3 bucket to send an event to the pipeline after upload
Why it's wrong here
Configuring the S3 bucket to send an event to the pipeline would only be used to initiate a new pipeline execution when an object is uploaded, not to interrupt an already-running pipeline or add a sign-off step. The S3 event, routed through EventBridge, can trigger a pipeline start, but by the time the upload event fires, the pipeline is already executing its source and build stages; it cannot retroactively insert an approval action before the deploy stage of the current execution. This approach fails to provide any manual control and would simply restart the pipeline or be ignored while the current execution continues.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 251-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 →
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.