DOP-C02 sample questions: 5 worked examples
Five scenario questions follow, one or more from each DOP-C02 area. Decide on an answer before opening the explanation, because the reasoning behind the wrong options is where most of the learning happens. All five were written for this site from the public exam guide; none comes from a real exam.
Question 1. A team deploys a web application to an Auto Scaling group behind an Application Load Balancer. They need new versions to go live with no reduction in capacity, an instant way to return to the old version, and no in-place changes to running instances. Which approach fits?
- A. An in-place rolling update that replaces files on existing instances
- B. A blue/green deployment that shifts load balancer traffic to a new Auto Scaling group
- C. Logging in to each instance and copying the new build manually
- D. Deploying to all instances at once and relying on alarms to detect problems
Show answer
Answer: B
A blue/green deployment launches a fully new environment, shifts traffic when it is healthy and keeps the old environment available for quick rollback. In-place rolling updates change running instances and reduce capacity during the update, a single manual instance swap is not automated, and deploying straight to production without a health check removes the safety net.
Want more questions like this? Full DOP-C02 practice tests →
Question 2. A company needs the same set of IAM roles and a logging bucket policy deployed to 40 accounts in several Regions, and every new account in the organization should receive them automatically. What is the best way?
- A. A CloudFormation StackSet with automatic deployment to the organization
- B. A separate CloudFormation stack created manually in each account
- C. A custom script run by an administrator whenever an account is created
- D. A template shared by email with each account owner
Show answer
Answer: A
CloudFormation StackSets with service-managed permissions deploy a template across accounts and Regions in an organization and can target new accounts automatically. Per-account console deployments are manual, a Lambda function that copies resources by hand adds custom code to maintain, and sharing a template by email does not deploy anything.
Want more questions like this? Full DOP-C02 practice tests →
Question 3. Security wants any S3 bucket that becomes publicly accessible to be corrected within minutes and the change recorded. Which design achieves this with the least custom code?
- A. A monthly report reviewed by the security team
- B. A cron job on one EC2 instance that scans buckets daily
- C. An AWS Config rule with an automatic remediation action
- D. A request that developers check bucket settings after each release
Show answer
Answer: C
An AWS Config rule detects the non-compliant bucket and an automatic remediation action, for example a Systems Manager Automation document, corrects it and records the action. Reviewing a monthly report is too slow, a daily cron job on one instance is a single point of failure and more to maintain, and relying on developers to notice is not a control.
Want more questions like this? Full DOP-C02 practice tests →
Question 4. Application logs from several services are stored in CloudWatch Logs. An engineer wants to count HTTP 500 errors per five minutes and be notified when the count is high, without changing the application. What should they do?
- A. Modify the application to call the PutMetricData API on every error
- B. Export the logs to S3 and query them with Athena once a week
- C. Build a dashboard and ask the team to watch it
- D. Create a metric filter on the log group and an alarm that notifies an SNS topic
Show answer
Answer: D
A metric filter turns matching log events into a CloudWatch metric, and an alarm on that metric can notify an SNS topic. Changing the application to publish custom metrics needs code changes, exporting logs to S3 for weekly analysis is not near real time, and a dashboard alone does not send notifications.
Want more questions like this? Full DOP-C02 practice tests →
Question 5. A database password stored in AWS Secrets Manager must change every 30 days without application downtime or code changes to the rotation schedule. Which statement is correct?
- A. Store the password in an environment variable and redeploy each month
- B. Enable automatic rotation on the secret and have the application read it at runtime
- C. Hard-code the password in the repository and update it by pull request
- D. Set a calendar reminder for an engineer to change it by hand
Show answer
Answer: B
Secrets Manager supports automatic rotation through a rotation function on a schedule, and applications that retrieve the secret at runtime pick up the new value. Storing the password in an environment variable or in code requires redeployment to change it, and a calendar reminder relies on manual work.
Want more questions like this? Full DOP-C02 practice tests →
What to do with your results
Score yourself, then write one sentence per miss on what the question was really asking. Missing a StackSets or Config question usually points to configuration management; missing a logs question points to monitoring and incident response. Add the study plan to schedule the gaps.
Five questions only show the style. A professional exam has 75 questions in 180 minutes, so practise full-length sets as well, and see the exam format for the mechanics.