Implement CI/CD pipelines.
15 practice questions under this official exam objective (DOP-C02), each with the answer key, an option-by-option explanation and instant feedback.
Questions under this objective
15 total · page 1 of 1Refactor user data to cfn-init with cfn-hup, and enforce the SSM document with a State Man
User data only runs when an instance boots, so editing it in the CloudFormation template does not update already-running EC2 instances. Refactoring th
Empty the non-empty S3 bucket from the custom resource's Lambda on Delete using RequestTyp
CloudFormation cannot delete a non-empty S3 bucket, and the bucket is populated because a custom resource copies website content into it from a source
Trigger CodePipeline with EventBridge on new commits and alert from ECR image scan finding
Two capabilities are required. First, the manual build and deploy process must become automated, which is done by storing the Dockerfile and deploymen
Use native Git in CodeBuild to clone, test, then create and push a Git tag when the tests
Cloning the CodeCommit repository with native Git and running the unit tests, then creating a Git tag and pushing it back to the repository when the t
Create the us-east-1 artifact store bucket for CodePipeline and add a deploy action using
The pipeline already produces an additional artifact for us-east-1, so the Region-specific work is the artifact store and the deploy action. Creating
Add a resource-based policy on the Lambda function granting Amazon S3 permission to invoke
S3 event notifications to Lambda require a resource-based policy on the Lambda function that permits the S3 service to invoke it; without that permiss
Roll the green Auto Scaling group to the new version first, then switch the ALB to the gre
The blue and green environments are represented by separate Auto Scaling groups and ALB target groups, and the deployment must shift traffic all at on
Use a blue/green deployment with the HalfAtATime configuration and the BeforeAllowTraffic
The requirements describe a blue/green deployment on an Application Load Balancer: a replacement fleet is launched automatically with no manual provis
Match the UPDATE_COMPLETE stack status in an EventBridge rule and invoke the tagging Lambd
Tagging must happen only after a successful update, and the signal for that is the CloudFormation stack instance reaching the UPDATE_COMPLETE status.
Export the bucket name as a CloudFormation output with the StackVariables namespace and de
The S3 bucket is created by a CloudFormation deploy action, so the later S3 deploy action needs the bucket name without it being hard-coded. Adding an
Store the Docker images in ECR and enable the local Docker layer cache in CodeBuild
Large Docker images built repeatedly across multiple builds mean the same layers are being rebuilt, which wastes both build time and cost. Storing the
Add an ECS deploy stage, output imagedefinitions.json, and run connectivity checks from a
The integration tests must confirm that the new service endpoint is reachable and that API methods return successful responses, and this must be done
Write CDK assertions tests and set the CodeBuild build phase OnFailure property to ABORT
The requirement is that unit tests run in the pipeline and that deployment proceeds only if no test fails. Writing tests with the AWS CDK assertions m
Pass records to AWS Step Functions and decouple the sequential steps into tasks and Lambda
Each record's processing is a multistep sequential and compute-intensive action where every step finishes within five minutes, and the current design
Point CodeUri at the local folder and deploy with sam deploy, or package the folder and us
The sam deploy command reports no changes because the CodeUri points at an S3 location whose contents are unchanged as far as CloudFormation is concer