Amazon DOP-C02 Practice Exam Questions & Answers
Amazon DOP-C02 Exam Details
Key details for this exam, checked against the published exam outline
- Exam Code
- DOP-C02
- Full Name
- AWS Certified DevOps Engineer - Professional
- Issuing Body
- Amazon Web Services
- Question Format (Our Bank)
- Multiple Choice
- Delivery
- Online proctored or at a Pearson VUE test centre
- Eligibility
- Experience in securing AWS infrastructure is expected
- Validity
- 3 years
- Full Question Set
- 449 questions Get All Questions
Free DOP-C02 Practice Questions
Answer each question, then see the correct answer and why it is right
Question 1 Domain 4 Monitoring and Logging
A DevOps team manages an application that dispatches a high volume of requests to several external systems. The application runs on a fleet of Amazon EC2 instances within an Auto Scaling group. It places outgoing requests into Amazon Simple Queue Service (Amazon SQS) queues before they are sent to the external systems. The application writes its logs to Amazon CloudWatch Logs.
The DevOps team needs to send a notification to an Amazon Simple Notification Service (Amazon SNS) topic whenever 10 or more errors occur within a 5-minute period for requests made to the external systems.
Which solution will satisfy these requirements with the LEAST operational overhead?
Amazon CloudWatch metric filters offer the lowest-overhead way to turn log data into actionable metrics and alarms. By defining a metric filter on the CloudWatch Logs log group with a regex pattern that matches log entries for external system errors, CloudWatch automatically increases a custom metric each time a matching event appears. A CloudWatch alarm set with a 5-minute period and a threshold of 10 will fire and publish straight to the SNS topic without needing any extra compute resources. Option B inserts an unnecessary Lambda invocation between the alarm and the SNS notification. Option C relies on anomaly detection, which is probabilistic and unsuitable for a hard threshold requirement. Option D needs a subscription filter plus a Lambda function to publish the custom metric, which adds more components, Lambda costs, and greater operational complexity than a native metric filter.
Question 2 Domain 4 Monitoring and Logging
A company needs its EC2 instances hardened against threats. The security team must be alerted when newly discovered vulnerabilities affect those instances, and it also requires a record of every login event on the instances.
Which approach satisfies these requirements?
This solution satisfies the requirements because Amazon Inspector scans the EC2 instances for newly discovered vulnerabilities and produces findings that can be reviewed in the Inspector console or delivered as alerts through Amazon Simple Notification Service (SNS). The Amazon CloudWatch Agent also gathers system logs from the EC2 instances and forwards them to Amazon CloudWatch Logs, where they can be retained, queried, and analyzed. These logs can serve as an audit trail of every login activity on the instances, along with other useful data such as performance metrics, errors, and events.
https://docs.aws.amazon.com/inspector/latest/user/what-is-inspector.html
Question 3 Domain 6 Security and Compliance
A DevOps team oversees a group of AWS accounts within an organization in AWS Organizations.
The company requires a solution that makes sure every Amazon EC2 instance runs an approved AMI managed by the DevOps team. The solution must also correct any use of AMIs that have not been approved. Individual account administrators must be unable to disable the requirement to use approved AMIs.
Which solution meets these requirements?
Turn On AWS Config Across the Organization:
AWS Config offers a detailed view of how AWS resources are configured in your AWS account. It can be used to assess, audit, and evaluate resource configurations.
Activating AWS Config across the organization makes sure all accounts are monitored for compliance.
Build a Conformance Pack Using the approved-amis-by-id AWS Config Managed Rule:
A conformance pack is a collection of AWS Config rules and remediation actions that can be deployed across an organization with ease.
The approved-amis-by-id managed rule verifies whether running instances use approved AMIs.
Roll Out the Conformance Pack Across the Organization:
Rolling out the conformance pack across the organization makes sure all accounts follow the policy of using only approved AMIs.
The conformance pack can be deployed through the AWS Management Console, CLI, or SDKs.
Set the Rule to Run the AWS-StopEC2Instance AWS Systems Manager Automation Runbook for Non-Compliant EC2 Instances:
The AWS-StopEC2Instance runbook can be set to automatically stop any EC2 instances found to be non-compliant (that is, not using approved AMIs).
This remediation step makes sure unauthorized instances are stopped promptly, enforcing the policy without manual work.
By following these steps, the solution makes sure all EC2 instances across the organization use approved AMIs, and any noncompliant instances are remediated automatically.
References:
AWS Config Conformance Packs
AWS Config Managed Rules
AWS Systems Manager Automation Runbooks
Get the complete DOP-C02 question set
$20$40
Question 4 Domain 4 Monitoring and Logging
A company has an AWS Control Tower landing zone. The DevOps team sets up a workload OU, and beneath it sit a development OU and a production OU. The company gives users unrestricted access to its AWS accounts so they can deploy applications.
The DevOps team must permit only one designated management IAM role to administer the IAM roles and policies in any AWS account within the production OU alone.
Which combination of steps will satisfy these requirements? {Select TWO.)
You need to understand how SCP inheritance works in AWS. Inheritance behaves differently for Deny policies than for Allow policies.
Allow policies are inherited by child OUs only when those children do not have an Allow policy of their own.
Deny policies always flow down to child OUs.
This is why an SCP that allows everything is always attached to the root by default. If that policy were restricted, the entire organization would be limited, regardless of what other policies say for the other OUs. So A is incorrect. D is also incorrect because it restricts the wrong OU.
Question 5 Domain 2 Configuration Management and IaC
A DevOps engineer has to set up an AWS CodePipeline pipeline that releases container images to an Amazon Elastic Container Registry (Amazon ECR) repository. The pipeline must hold off until the prior run has completed and must launch whenever new Git tags are pushed to a Git repository linked through AWS CodeConnections. An existing deployment pipeline must start upon the release of new container images. Which solution will satisfy these requirements?
The requirements call for current CodePipeline features, strict sequential execution, tag-based Git triggers, and loose coupling between pipelines. CodePipeline V2 adds execution modes such as QUEUED and SUPERSEDED, along with built-in trigger filtering when AWS CodeConnections is used.
The need to wait for the previous run to complete maps directly to QUEUED mode, which makes pipeline executions run one after another instead of replacing executions already in progress. SUPERSEDED mode would stop the running execution, which breaks the requirement.
Pipelines can be triggered on new Git tags through CodePipeline V2 trigger filters that use refs/tags/*. Branch-based triggers would not meet this condition.
Last, the requirement for an existing deployment pipeline to run when new container images are published is best handled with Amazon EventBridge, which natively emits events for ECR image push actions. EventBridge enables decoupled, event-driven coordination between pipelines without tight dependencies or custom scripting. This is the AWS-recommended method for pipeline-to-pipeline coordination.
Options C and D depend on CodePipeline V1, which lacks modern trigger filtering and execution control. Option B wrongly uses SUPERSEDED mode and branch-based triggers.
Therefore, Option A correctly pairs CodePipeline V2, QUEUED execution mode, tag-based triggers, and EventBridge-driven pipeline chaining, meeting all requirements with best practices and minimal operational complexity.
Question 6 Domain 1 SDLC Automation
A DevOps team is responsible for the infrastructure behind an application. The application relies on long-running processes that pull items from an Amazon Simple Queue Service (Amazon SQS) queue. The application runs on an Auto Scaling group.
Recently, the application ran into a problem where items took considerably longer to process. The queue grew beyond its anticipated size, which disrupted several business workflows. All of the application's logs are sent to a third-party logging tool.
The team currently receives alerts through an Amazon Simple Notification Service (Amazon SNS) topic. The team must be notified whenever the queue grows beyond its expected size.
Which solution will satisfy these requirements with the GREATEST operational efficiency?
Amazon SQS publishes several standard CloudWatch metrics by default, among them ApproximateNumberOfMessagesVisible, which indicates how many messages can be retrieved from the queue (in other words, how many messages are waiting to be processed). This is the key metric for tracking queue backlog and processing delays.
Monitoring ApproximateNumberOfMessagesVisible provides a direct, near real-time view of processing delays or backlog.
CloudWatch metrics are collected automatically and can be used without creating custom metrics or Lambda functions, which improves operational efficiency by lowering complexity and upkeep.
A CloudWatch alarm on this metric, using a static threshold and a reasonable evaluation period such as 1 hour, is enough to notify the team when the queue grows past its expected size.
The alarm can be configured directly to publish notifications to the existing SNS topic, keeping integration with the team's current alerting in place.
The ApproximateNumberOfMessagesDelayed metric counts messages that are delayed and not yet available for processing because of delay settings. It does not represent the backlog that causes the business process delays.
Options C and D add unnecessary complexity by requiring Lambda functions, custom metrics, or scheduled invocations, which lowers operational efficiency compared with built-in CloudWatch metrics and alarms.
Reference from AWS Official Documentation and Study Guide:
Amazon SQS Monitoring with CloudWatch Metrics:
'Amazon SQS automatically publishes metrics to CloudWatch, including ApproximateNumberOfMessagesVisible, which displays the number of messages that can be retrieved.'
(Source: Amazon SQS Monitoring - AWS Documentation)
Setting CloudWatch Alarms for SQS Queues:
'You can set CloudWatch alarms on SQS metrics such as ApproximateNumberOfMessagesVisible to get notified when queue size passes a threshold.'
(Source: Amazon CloudWatch Alarms - AWS Documentation)
AWS DevOps Engineer Professional Exam Guide:
'Efficient queue backlog alerting should rely on native CloudWatch metrics to reduce operational overhead.'
(Source: Official AWS Certified DevOps Engineer Professional Study Guide)
Question 7 Domain 6 Security and Compliance
An organization plans to run a proprietary, enterprise-grade in-memory data store as a grid on AWS. The software can operate across several server nodes running any Linux distribution. Whenever a node joins or leaves, the whole cluster must be reconfigured. Each change requires the /etc./cluster/nodes config file to be edited so it lists the IP addresses of the cluster's current members.
The company wants the process of adding new nodes to a cluster to be automated.
Which action should a DevOps engineer take to satisfy these requirements?
Custom recipes can be run by hand, but it is usually better to let AWS OpsWorks Stacks run them automatically. Each layer includes built-in recipes linked to five lifecycle events: Setup, Configure, Deploy, Undeploy, and Shutdown. Whenever an event happens on an instance, AWS OpsWorks Stacks executes the matching recipes for every layer the instance belongs to, which carry out the related tasks. For instance, once an instance finishes booting, AWS OpsWorks Stacks fires a Setup event. This event runs the layer's Setup recipes, which generally handle work such as installing and configuring packages
Question 8 Domain 2 Configuration Management and IaC
An organization runs workloads on Amazon ECS using the Amazon EC2 launch type and needs every log record consolidated in Amazon CloudWatch. Recently, the ECS tasks could not be deployed, and an error message points to a missing permission. The IAM role in use includes logs:CreateLogGroup, logs:CreateLogStream, and logs:PutLogEvents.
Which action will resolve this issue?
ECS container instances require an IAM role that trusts ECS (the ecs-tasks.amazonaws.com principal) so they can assume permissions for CloudWatch logging. Without this trust relationship, ECS cannot send logs even when the required permissions are present.
Question 9 Domain 4 Monitoring and Logging
An organization is building an application that produces log events. Every one tenth of a second, the application generates five separate metrics per event and produces a substantial volume of data. The organization must configure the application to write these logs to Amazon Time stream. A daily query will be run by the company against the Timestream table.
Which combination of steps will satisfy these requirements with the QUICKEST query performance? (Select THREE.)
Option A is correct because sending several log events within one write operation through batch writes is a recommended practice for improving the performance and cost of data ingestion into Timestream. Batching cuts down on network round trips and API calls and lets Timestream process the data in parallel. It can also raise the compression ratio of data in both the memory store and the magnetic store, which lowers storage costs and boosts query performance1.
Option B is incorrect because writing every log event as its own write operation does not follow the recommended practice for efficient data ingestion into Timestream. It increases network round trips and API calls and lowers the compression ratio in both the memory store and the magnetic store. The result is higher storage costs and slower query performance1.
Option C is incorrect because modeling each log as a single-measure record is not recommended for query performance in Timestream. It creates several records for each timestamp, which enlarges the storage footprint and increases query latency. Queries would also need joins to retrieve multiple measures for the same timestamp, adding complexity and overhead to query processing2.
Option D is correct because modeling each log as a multi-measure record is a recommended approach for query performance in Timestream. It stores a single record per timestamp, which reduces storage size and query latency. Multiple measures for the same timestamp can be queried without joins, which simplifies and speeds up query processing2.
Option E is incorrect because setting the memory store retention period longer than the magnetic store retention period is not a valid configuration in Timestream. The memory store retention period must always be shorter than or equal to the magnetic store retention period. This ensures data moves from the memory store to the magnetic store before it expires from the memory store3.
Option F is correct because setting the memory store retention period shorter than the magnetic store retention period is a valid configuration in Timestream. The memory store retention period controls how long data stays in the memory store, which is optimized for fast point-in-time queries. The magnetic store retention period controls how long data stays in the magnetic store, which is optimized for fast analytical queries. Setting these periods appropriately lets you balance storage costs and query performance for your application's needs3.
References:
1: Batch writes
2: Multi-measure records vs. single-measure records
3: Storage
Practice every DOP-C02 question in the full set, each one with its verified answer and a detailed explanation
Get Full AccessWhat the Amazon DOP-C02 Exam Covers
Exam domains verified against the Official Amazon DOP-C02 exam guide, last checked November 2026.
Domain 1 SDLC Automation
22%Implement CI/CD pipelines using AWS Developer Tools and automation frameworks. Build and manage deployment artifacts while integrating automated testing across instance, container, and serverless environments.
Above Practice Question from this Domain: Q6
Domain 2 Configuration Management and IaC
17%Define cloud infrastructure using Infrastructure as Code with CloudFormation and other AWS tools. Deploy automation to provision systems and manage AWS accounts in multi-account and multi-Region environments at scale.
Domain 3 Resilient Cloud Solutions
15%Implement highly available and scalable solutions that meet business requirements. Design automated recovery processes and redundancy strategies to meet RTO and RPO targets.
Domain 4 Monitoring and Logging
15%Configure collection, aggregation, and storage of logs and metrics using AWS monitoring services. Detect issues and automate responses across complex distributed environments.
Domain 5 Incident and Event Response
14%Manage event sources to trigger notifications and automated actions in response to system events. Troubleshoot application and infrastructure failures while implementing configuration changes.
DOP-C02 Exam FAQ
Common questions about the exam itself
Do I need any prior AWS certification before taking DOP-C02?
How hard is DOP-C02 compared to other AWS exams?
What is the hardest domain on DOP-C02?
How long does preparation for DOP-C02 typically take?
How many questions are on DOP-C02 and how much time do I have?
What happens on exam day for DOP-C02?
Can I retake DOP-C02 if I fail?
How long does my DOP-C02 certification stay valid?
What job roles does DOP-C02 prepare you for?
How does DOP-C02 relate to the AWS Solutions Architect Professional exam?
Other Amazon Exams
Free practice questions for more Amazon certification exams
