Free DOP-C02 practice questions: 20 with answers

Updated November 23, 2026

Twenty original scenario questions for DOP-C02, spread over the six domains in proportion to the published weights: four on SDLC Automation, four on Configuration Management and IaC, three each on Resilient Cloud Solutions, Monitoring and Logging, Incident and Event Response, and Security and Compliance. They are written at the level of the exam guide, they are not real exam questions, and the real exam also has multiple response items, which are not reproduced here. Read the last sentence of each scenario first, underline the constraint (least operational overhead, no downtime, prevent rather than detect) and aim for 16 or more correct. The study plan shows how to turn misses into review time.

SDLC Automation

Question 1. A CodeBuild project runs unit tests in the build phase of its buildspec. The pipeline must stop and not deploy when any test fails. What makes the build fail?

  • A. The test command prints the word FAILED to the build log
  • B. The test command returns a non-zero exit status
  • C. A CloudWatch alarm on the log group is created
  • D. The deploy stage is placed before the build stage
Show answer

Answer: B

A command in the build phase that exits with a non-zero status fails the build, and a failed build action stops the pipeline stage. Printing a message does not change the exit status, a CloudWatch alarm reacts after the fact, and the deploy stage does not check test results on its own.

Want more questions like this? Full DOP-C02 practice tests →

Question 2. An Elastic Beanstalk web application must be updated with no loss of serving capacity. If the new version is unhealthy, the existing instances must be left completely untouched and the new instances discarded. Which deployment policy fits?

  • A. All at once
  • B. Rolling
  • C. Immutable
  • D. Rolling with additional batch
Show answer

Answer: C

An immutable deployment launches a full new set of instances in a separate Auto Scaling group and terminates them if they fail health checks, leaving the original instances unchanged. All at once takes every instance out of service together, rolling takes batches out of service and reduces capacity, and rolling with an additional batch keeps capacity but still updates the existing instances in place.

Want more questions like this? Full DOP-C02 practice tests →

Question 3. A pipeline in account A deploys to account B through a cross-account role. The deploy action in account B fails because it cannot decrypt the artifacts in the pipeline artifact bucket, which uses the default AWS managed S3 key. What is the correct fix?

  • A. Use a customer managed KMS key that account B may use as the artifact store encryption key
  • B. Make the artifact bucket public
  • C. Copy the artifacts to account B manually before each run
  • D. Share the AWS managed S3 key with account B
Show answer

Answer: A

Cross-account pipelines need a customer managed KMS key whose policy lets the pipeline role and the other account use it, and the pipeline artifact store must be configured with that key. An AWS managed key cannot be shared with another account. Making the bucket public is insecure, and copying artifacts by hand removes the automation.

Want more questions like this? Full DOP-C02 practice tests →

Question 4. A company wants builds to pull npm packages only through a repository it controls, with packages from the public registry fetched and cached on first use. Which service should be used?

  • A. Amazon ECR
  • B. An S3 bucket with public read access
  • C. AWS CodeCommit
  • D. AWS CodeArtifact with an external connection to the public npm registry
Show answer

Answer: D

CodeArtifact repositories can have an external connection to a public registry such as npm, so builds pull through a controlled, cached repository. ECR stores container images, an S3 bucket is not a package repository, and CodeCommit hosts source code.

Want more questions like this? Full DOP-C02 practice tests →

Configuration Management and IaC

Question 5. A CloudFormation template creates an S3 bucket that holds audit data. The bucket must survive when the stack is deleted. What should be added to the bucket resource?

  • A. DeletionPolicy: Snapshot
  • B. DeletionPolicy: Retain
  • C. A stack policy that denies Delete
  • D. DependsOn on the stack
Show answer

Answer: B

DeletionPolicy Retain keeps the resource when the stack is deleted and works on any resource type. Snapshot is only for resources that support snapshots, which S3 buckets do not. A stack policy governs updates, not deletion, and DependsOn only sets creation order.

Want more questions like this? Full DOP-C02 practice tests →

Question 6. A platform team must deploy the same CloudFormation template to every account in an AWS Organizations organization, including accounts that are created later, without per-account setup. What should they use?

  • A. A nested stack in the management account
  • B. A StackSet with self-managed permissions
  • C. A StackSet with service-managed permissions and automatic deployment
  • D. A change set run by hand in each new account
Show answer

Answer: C

A StackSet with service-managed permissions and automatic deployment uses Organizations to deploy to accounts in the target organizational units, including new ones. Self-managed permissions need administration and execution roles created in every account, a nested stack stays in one account, and manual change sets do not scale.

Want more questions like this? Full DOP-C02 practice tests →

Question 7. A team wants to roll out a new feature flag value to its application gradually and have the change roll back automatically if a CloudWatch alarm on error rate fires during the rollout. Which service fits?

  • A. AWS AppConfig with a gradual deployment strategy and an alarm monitor
  • B. AWS Systems Manager Parameter Store
  • C. AWS Secrets Manager
  • D. AWS Service Catalog
Show answer

Answer: A

AWS AppConfig deployment strategies roll configuration out gradually and can roll back when a CloudWatch alarm monitored by the environment goes into alarm. Parameter Store holds values without a gradual rollout, Secrets Manager rotates secrets, and Service Catalog provisions approved products.

Want more questions like this? Full DOP-C02 practice tests →

Question 8. Security requires that no member account in the organization can ever stop AWS CloudTrail logging, even by an account administrator. Which control meets the requirement?

  • A. An AWS Config rule with automatic remediation
  • B. An IAM policy created in every member account
  • C. An Amazon GuardDuty detector in every account
  • D. A service control policy that denies cloudtrail:StopLogging
Show answer

Answer: D

A service control policy that denies cloudtrail:StopLogging limits what every principal in the member accounts can do, including administrators, so it prevents the action. A Config rule with remediation detects and repairs after the fact, an IAM policy inside each account can be changed by that account administrator, and GuardDuty only alerts.

Want more questions like this? Full DOP-C02 practice tests →

Resilient Cloud Solutions

Question 9. A web application runs in two Regions behind Application Load Balancers. Users should normally reach the primary Region, and traffic should move to the second Region automatically when the primary stops responding. What should be configured?

  • A. A Route 53 simple routing record with both load balancers
  • B. Route 53 failover records with a health check on the primary
  • C. Two weighted records at 50 each
  • D. A single record pointing to the primary and a manual DNS change during an outage
Show answer

Answer: B

Route 53 failover routing with a health check on the primary record shifts DNS answers to the secondary record when the health check fails. Simple routing returns no health-based decision, weighted records at 50/50 send half the users to the second Region all the time, and latency routing without health checks cannot express primary and standby.

Want more questions like this? Full DOP-C02 practice tests →

Question 10. Worker instances in an Auto Scaling group process messages from an SQS queue. Load is irregular, and the queue sometimes builds a backlog. How should the group scale so that capacity follows the backlog?

  • A. A target tracking policy on average CPU utilization
  • B. A scheduled action at a fixed time each day
  • C. A target tracking policy on a backlog-per-instance metric
  • D. A larger instance type with no scaling policy
Show answer

Answer: C

Scaling on a backlog-per-instance metric, calculated from the queue length and the number of instances, with a target tracking policy keeps processing capacity in line with the work waiting. CPU can stay low while the queue grows, a fixed schedule ignores real load, and a larger instance type does not react to demand.

Want more questions like this? Full DOP-C02 practice tests →

Question 11. A reporting system has an RTO of 4 hours and an RPO of 24 hours. The business wants the lowest cost, and the backups must survive the loss of a Region. Which approach fits?

  • A. Scheduled AWS Backup plans with a copy to a second Region, restored on demand
  • B. A warm standby environment in a second Region
  • C. An active/active deployment in two Regions
  • D. Backups stored only in the primary Region
Show answer

Answer: A

With a loose RTO and RPO, backup and restore is the cheapest strategy, and copying backups to a second Region protects against a Region loss. Warm standby and active/active run duplicate capacity that the targets do not require, and keeping backups only in the same Region fails the Region-loss requirement.

Want more questions like this? Full DOP-C02 practice tests →

Monitoring and Logging

Question 12. An application writes the text PAYMENT_TIMEOUT to its CloudWatch log group whenever a payment call times out. The team needs an alarm when more than 10 occur in 5 minutes. What is the simplest solution?

  • A. Review the logs manually every 5 minutes
  • B. Create an AWS Config rule for the log group
  • C. Use the default EC2 CPUUtilization metric
  • D. Create a metric filter on the log group and an alarm on the metric
Show answer

Answer: D

A metric filter on the log group turns matching lines into a CloudWatch metric, and an alarm can then watch the metric. Scanning the logs by hand is not an alarm, Config records resource configuration, not log content, and the default EC2 metrics do not include application messages.

Want more questions like this? Full DOP-C02 practice tests →

Question 13. A microservices application shows slow responses for some requests. The team needs to see which downstream service call adds the latency. Which service gives a request-level view?

  • A. AWS CloudTrail
  • B. AWS X-Ray
  • C. AWS Config
  • D. VPC Flow Logs
Show answer

Answer: B

AWS X-Ray traces requests across services and shows a service map with latency per segment. CloudTrail records API calls, Config records configuration changes, and VPC Flow Logs describe network flows without application call timing.

Want more questions like this? Full DOP-C02 practice tests →

Question 14. The operations team wants an alarm on memory utilization of Linux EC2 instances. The default EC2 metrics in CloudWatch show no memory data. What must be done?

  • A. Enable detailed monitoring on the instances
  • B. Attach the instances to an Application Load Balancer
  • C. Install and configure the CloudWatch agent to publish memory metrics
  • D. Add the instances to an Auto Scaling group
Show answer

Answer: C

Memory use is not among the default EC2 metrics, so the CloudWatch agent must be installed and configured to publish it as a custom metric. Detailed monitoring only raises the frequency of the existing metrics, and Auto Scaling or an ELB do not add memory data.

Want more questions like this? Full DOP-C02 practice tests →

Incident and Event Response

Question 15. Any security group in the account that allows SSH from 0.0.0.0/0 must be corrected automatically, with the least custom code. What should be used?

  • A. The Config managed rule restricted-ssh with an automatic remediation action that runs an Automation document
  • B. A cron script on an administration instance
  • C. A CloudTrail trail with a weekly report
  • D. A manual review each quarter
Show answer

Answer: A

The AWS Config managed rule restricted-ssh detects unrestricted SSH, and an automatic remediation action can run a Systems Manager Automation document to fix it. A cron script is custom code to maintain, CloudTrail records but does not remediate, and a manual review is not automatic.

Want more questions like this? Full DOP-C02 practice tests →

Question 16. A CodeDeploy deployment to EC2 instances fails during the ApplicationStart lifecycle event. Where should the engineer look first for the cause?

  • A. The CloudTrail event for CreateDeployment
  • B. The Route 53 health check status
  • C. The monthly billing report
  • D. The failed lifecycle event details and the script output in the CodeDeploy agent logs on the instance
Show answer

Answer: D

The deployment details show which lifecycle event failed, and the script output and agent logs on the instance show why the hook script failed. CloudTrail shows who called the API, a Route 53 health check does not describe hook scripts, and billing reports contain no deployment information.

Want more questions like this? Full DOP-C02 practice tests →

Question 17. The operations team wants an email whenever AWS Health reports a scheduled event that affects EC2 instances in the account. What is the best design?

  • A. Poll CloudWatch Logs by hand every morning
  • B. An EventBridge rule matching AWS Health events with an SNS topic target
  • C. A CloudWatch alarm on CPUUtilization
  • D. An AWS Config rule on the instances
Show answer

Answer: B

AWS Health publishes events to EventBridge, so a rule that matches the aws.health source can send them to an SNS topic with an email subscription. Polling logs by hand is not event driven, a CloudWatch CPU alarm does not report Health events, and a Config rule does not receive them.

Want more questions like this? Full DOP-C02 practice tests →

Security and Compliance

Question 18. An application reads a database password from AWS Secrets Manager. Policy requires the password to change every 30 days without redeploying the application. What should be configured?

  • A. Store the password in an environment variable and update it each month
  • B. Keep the password in the source code
  • C. Enable automatic rotation on the secret and have the application fetch it at run time
  • D. Set a calendar reminder for an administrator
Show answer

Answer: C

Secrets Manager can rotate the secret on a schedule by using a rotation function, and the application reads the current value through the API at run time. A password in an environment variable needs a redeployment to change, a hard-coded value in the source code is a leak risk, and a reminder in a calendar is manual.

Want more questions like this? Full DOP-C02 practice tests →

Question 19. Developers may create IAM roles for their applications, but those roles must never gain more permissions than a defined ceiling. Which approach enforces that?

  • A. Allow role creation only when a specified permissions boundary is attached
  • B. Give developers full IAM access and trust them
  • C. Require role names to start with app-
  • D. Require MFA for developers
Show answer

Answer: A

A permissions boundary caps the permissions of a role, and a policy that allows role creation only when the iam:PermissionsBoundary condition equals the approved boundary enforces it. Allowing full IAM access removes the ceiling, a naming convention is not a control, and MFA does not limit permissions.

Want more questions like this? Full DOP-C02 practice tests →

Question 20. A company with many accounts and Regions wants findings from GuardDuty, Inspector and Config to appear in one place, with one delegated administrator account. Which service is designed for this?

  • A. AWS CloudTrail
  • B. Amazon Macie
  • C. AWS Trusted Advisor
  • D. AWS Security Hub
Show answer

Answer: D

AWS Security Hub aggregates findings from other security services and supports a delegated administrator across the organization and cross-Region aggregation. CloudTrail records API activity, Macie discovers sensitive data in S3, and Trusted Advisor gives best-practice checks for a single account view.

Want more questions like this? Full DOP-C02 practice tests →

After the test

Count correct answers per domain. Misses in one domain point to the matching guide: SDLC automation, configuration management and IaC, resilient cloud solutions, monitoring, logging and incident response or security and compliance. The real exam has 75 questions in 180 minutes, so this test is a short diagnostic and not a prediction of your result.