Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Amazon AWS Certified DevOps Engineer - Professional Exam DOP-C02 Exam Questions

Last updated: · 11 practice questions with answers and explanations

Page: 1 / 30 Total 449 questions

Want more questions? Get Premium Access.

Question 1

New Multiple answers

Topic: SDLC Automation

Skill tested: Designs staged CodePipeline releases with automated validation and controlled production promotion.

A company deploys a containerized application to Amazon ECS using AWS CodePipeline and CodeBuild. Production releases must use the exact image artifact that passed integration tests in staging; rebuilding the image for production is prohibited. A production deployment must also wait for an operations approval, while failed validation must prevent promotion. Which TWO pipeline changes best meet these requirements? Select TWO.

Correct Answer: D. Add a manual approval action before the production deployment stage and notify the designated operations approvers.; E. Build and tag the container image once, push it to Amazon ECR, and pass the immutable image digest or image URI through subsequent stages.
Explanation:

Building once and promoting the same ECR image, preferably identified by its digest, preserves artifact identity between tested staging and production releases. A second build can produce a different image even from the same source, so it violates the stated constraint. The manual approval action provides an explicit gate before production; a CloudFormation change set can help review infrastructure changes but does not itself replace pipeline approval. Staging tests are important, but the question asks for two changes, and the pipeline's stated validation already must block promotion; the approval and immutable artifact requirements are the two changes selected.

Question 2

New Single answer

Topic: SDLC Automation

Skill tested: Selects an EC2 deployment strategy that limits release impact and supports automated rollback.

A financial services company runs a web application on an Auto Scaling group behind an Application Load Balancer. Its deployment process uses AWS CodeDeploy. Releases must avoid taking the entire service offline, and the team wants to shift traffic gradually while monitoring application health. If health deteriorates, the deployment must be reversible without manually rebuilding the previous release. Which approach is MOST appropriate?

Correct Answer: D. Use a blue/green deployment with traffic shifting through the load balancer, configure a deployment alarm, and retain the prior environment for rollback.
Explanation:

CodeDeploy blue/green deployments provision a replacement environment and can shift load-balancer traffic gradually, allowing health-based alarms to stop or roll back a faulty release. Keeping the previous environment available supports rapid reversal without rebuilding it. An all-at-once in-place deployment risks broad interruption, while replacing every instance at once is similarly disruptive. A one-at-a-time deployment can reduce impact, but omitting health checks and relying on a scheduled restoration does not provide the required monitored, automated rollback.

Question 3

New Multiple answers

Topic: Configuration Management and IaC

Skill tested: Automates multi-account, multi-Region provisioning with reusable infrastructure templates and centralized governance.

A company operates dozens of AWS accounts across several Regions. New application accounts must receive a standard VPC, centralized logging configuration, and approved IAM roles. The platform team needs consistent provisioning from reusable templates, account-level governance, and the ability to deploy the baseline across Regions without maintaining a separate manual process for each account. Which TWO approaches best satisfy these requirements? Select TWO.

Correct Answer: B. Use CloudFormation StackSets with service-managed permissions to deploy baseline stacks across organizational accounts and selected Regions.; D. Use AWS Control Tower account-factory capabilities to provision governed accounts within the organization.
Explanation:

Control Tower provides a governed account-provisioning path, while CloudFormation StackSets can deploy reusable stacks across accounts in an AWS Organization and specified Regions using service-managed permissions. Together, these address account onboarding and repeatable multi-Region baseline deployment. Copying templates delegates consistency to each team, and a central long-lived administrator key creates an unnecessary credential risk. AWS Config can evaluate and remediate supported configuration drift, but it is not an account factory or a complete mechanism for provisioning all the requested resources.

Question 4

New Single answer

Topic: Configuration Management and IaC

Skill tested: Uses immutable deployment patterns and parameterized templates to manage infrastructure lifecycle safely.

A SaaS provider manages customer environments with CloudFormation. Teams currently edit live stacks manually when customer requirements change, causing drift and inconsistent recovery. The provider wants reusable infrastructure components, controlled changes, and a reliable way to determine the impact of a proposed update before applying it. The solution must preserve customer data resources when application infrastructure is replaced. What is the BEST approach?

Correct Answer: A. Define reusable nested or modular CloudFormation templates, manage changes through version control, and review change sets before executing updates; apply retention policies to data resources that must survive replacement.
Explanation:

Reusable templates under version control make infrastructure changes reviewable and repeatable. CloudFormation change sets show proposed effects before execution, while suitable retention policies protect designated data resources from deletion when stacks or resources are replaced. Direct scripts and spreadsheets do not provide equivalent declarative lifecycle management. Console-only changes continue to create unmanaged drift. StackSets are useful for coordinated deployments across accounts or Regions, but they do not require deleting resources before updates and are not, by themselves, the right answer for safe per-customer lifecycle changes.

Question 5

New Single answer

Topic: Resilient Cloud Solutions

Skill tested: Designs multi-AZ database recovery within defined recovery time and recovery point objectives.

An online retailer runs a production relational database on Amazon RDS in one Availability Zone. The business requires automatic failover after an Availability Zone failure, an RTO under five minutes, and minimal data loss. The application uses the database endpoint rather than a hard-coded IP address. Read scaling is not a requirement, and the company wants to avoid managing database replication itself. Which solution is MOST appropriate?

Correct Answer: D. Enable RDS Multi-AZ deployment and ensure the application reconnects using the RDS endpoint after failover.
Explanation:

RDS Multi-AZ maintains a standby in a different Availability Zone and provides managed failover, fitting the requirement for a short recovery time without customer-managed replication. The application should tolerate reconnection and continue using the database endpoint, whose DNS resolution points to the active instance after failover. A read replica is primarily a read-scaling or recovery option that requires promotion and application changes. Snapshot restoration is generally too slow for the stated RTO, and scheduled asynchronous copying can lose data and does not provide managed failover.

Question 6

New Single answer

Topic: Resilient Cloud Solutions

Skill tested: Builds decoupled, automatically scaling processing with durable buffering and failure handling.

A media platform receives unpredictable bursts of image-processing requests. Processing can take several minutes, and the ingestion API must remain responsive even when workers are saturated. A failed job must not block other jobs, and operators need access to messages that repeatedly fail processing. The system runs on AWS and should scale worker capacity based on backlog. Which TWO design choices best meet these requirements? Select TWO.

Correct Answer: C. Place requests in an Amazon SQS queue, use an Auto Scaling worker fleet that scales using queue backlog metrics, and configure a dead-letter queue with an appropriate redrive policy.
Explanation:

SQS provides durable buffering that decouples API acceptance from worker availability. Workers can scale in response to queue depth or backlog-per-worker metrics, and a dead-letter queue isolates messages that exceed the configured receive or processing retry threshold for investigation. Synchronous processing ties API responsiveness to long-running work. A fixed fleet with discarded requests cannot absorb bursts reliably. SNS alone is a notification service rather than the required work queue, and longer timeouts do not address throughput, backlog, or poison-message handling.

Question 7

New Single answer

Topic: Monitoring and Logging

Skill tested: Centralizes multi-account CloudWatch logs with cross-account observability and retention controls.

A company has production workloads in multiple AWS accounts and Regions. The security team needs a central operations account where engineers can search application logs without logging in to each workload account. Workload accounts must retain ownership of their log groups, and retention periods must be controlled centrally. The solution should minimize custom log-forwarding code. Which approach is MOST appropriate?

Correct Answer: D. Use CloudWatch cross-account observability by configuring the workload accounts as source accounts and the operations account as a monitoring account; centrally manage log-group retention through organization-level controls or deployment automation.
Explanation:

CloudWatch cross-account observability lets a monitoring account access supported telemetry, including logs, from linked source accounts while log groups remain in their source accounts. This avoids custom polling and preserves workload-account ownership. Retention is a log-group configuration, so it should be governed and applied using appropriate centralized controls or automation rather than assumed to be enforced merely by linking accounts. Per-account S3 analysis increases operational friction, custom polling adds code and delay, and CloudTrail records AWS API activity rather than application log streams.

Question 8

New Single answer

Topic: Monitoring and Logging

Skill tested: Correlates service metrics and traces to identify latency causes across distributed applications.

A company's serverless checkout service has rising end-to-end latency, but individual Lambda function error rates remain low. The workflow invokes several functions and calls downstream AWS services. The operations team needs to identify which segment contributes most to latency and correlate service behavior across a request, rather than simply alerting on total duration. Which solution is MOST appropriate?

Correct Answer: A. Enable AWS X-Ray tracing for the supported components, instrument the functions and downstream calls, and analyze service maps and traces alongside CloudWatch metrics.
Explanation:

Distributed tracing with X-Ray can correlate segments across instrumented components and expose where a request spends time, while CloudWatch metrics provide operational trends and alarms. This directly addresses attribution of latency rather than merely observing that it exists. Increasing memory might improve some Lambda workloads but is an unverified optimization and does not identify the cause. A duration alarm detects threshold breaches but cannot explain the slow segment, and CloudTrail is an audit record of AWS API activity, not an application request-tracing system.

Question 9

New Multiple answers

Topic: Incident and Event Response

Skill tested: Routes operational events through EventBridge to automated, idempotent remediation workflows.

A platform team wants to respond automatically when an Amazon EC2 instance enters the impaired status. The response should invoke a controlled remediation workflow, notify the on-call team, and avoid actions on unrelated instance state changes. The workflow may receive duplicate event deliveries, so repeated invocation must not cause harmful repeated changes. Which TWO implementation choices are most appropriate? Select TWO.

Correct Answer: A. Create an Amazon EventBridge rule matching the relevant EC2 state-change event and target a Systems Manager Automation runbook or a Lambda remediation function.; B. Use an EventBridge rule with a narrowly scoped event pattern, grant the target only required permissions, and make remediation idempotent using the event or resource state.
Explanation:

EventBridge can match EC2 status-related events and invoke an automated target such as Systems Manager Automation or Lambda; a separate target or workflow step can notify the on-call team. A narrowly scoped rule limits unrelated triggers, while least-privilege permissions and idempotent logic make duplicate deliveries safe. An unrestricted role and termination action are dangerous and do not meet controlled remediation needs. Polling is less efficient and less immediate, while email-only notification does not automate the requested response.

Question 10

New Single answer

Topic: Incident and Event Response

Skill tested: Diagnoses deployment failures by correlating CodeDeploy lifecycle hooks, instance logs, and service health.

A team's CodeDeploy deployment to an EC2 Auto Scaling group fails during the ApplicationStart lifecycle event. The deployment dashboard reports that the hook timed out, but the application package was successfully downloaded and the instances remain healthy in the load balancer. The failure began after a recent change to the startup script. The team needs the most direct next troubleshooting step before modifying the deployment configuration. What should the engineer do?

Correct Answer: A. Inspect the CodeDeploy agent and deployment lifecycle logs on a failed instance, then review the ApplicationStart script output and process state.
Explanation:

The failure is localized to ApplicationStart, and the recent script change is a strong lead. Reviewing the CodeDeploy agent and deployment logs on an affected instance, together with the script's output and process state, can reveal a command that hangs, exits unsuccessfully, or fails to start the application. Increasing the timeout might conceal rather than correct the cause. The healthy load-balancer status does not implicate the launch template, and disabling health checks removes useful safety signals without addressing the lifecycle failure.

Question 11

New Multiple answers

Topic: Security and Compliance

Skill tested: Enforces organization-wide preventive guardrails and detects noncompliant resource configurations.

A regulated company needs to prevent member accounts from disabling mandatory AWS CloudTrail logging or creating publicly accessible S3 buckets. The security team must also detect and report existing or later configuration drift across its AWS Organization. Application teams must retain normal permissions for unrelated workloads, and the controls should be centrally governed. Which TWO measures best satisfy these requirements? Select TWO.

Correct Answer: B. Use AWS Config organization-level rules or conformance packs to evaluate the relevant configurations and aggregate compliance findings centrally.; C. Attach service control policies that deny disabling required CloudTrail configuration and deny prohibited public S3 access configurations, with carefully scoped exceptions where needed.
Explanation:

Service control policies provide organization-level permission guardrails for member accounts; they do not grant permissions, but can prevent covered principals from performing prohibited actions even when local IAM policies allow them. AWS Config organization-level rules or conformance packs provide continuous evaluation and centralized compliance reporting, including visibility into existing drift. Administrator access plus periodic review is not preventive. CPU alarms are unrelated to these configuration changes, and restricting only the security team's IAM policy leaves application principals unaffected.