CloudExamCheap

DOP-C02 Practice Exam: AWS Certified DevOps Engineer - Professional

460 questions · 180 min timed mode · AWS · Updated 2026

Professional DevOps: CI/CD at scale, IaC, resilience engineering, and 2am incident heroics.

What you'll be tested on

Sample DOP-C02 questions

A company has a mobile application that makes HTTP API calls to an Application Load Balancer (ALB). The ALB routes requests to an AWS Lambda function. Many different versions of the application are in use at any given time, including versions that are in testing by a subset of users. The version of the application is defined in the user-agent header that is sent with all requests to the API. After a series of recent changes to the API, the company has observed issues with the application. The company needs to gather a metric for each API operation by response code for each version of the application that is in use. A DevOps engineer has modified the Lambda function to extract the API operation name, version information from the user-agent header and response code. Which additional set of actions should the DevOps engineer take to gather the required metrics?
  1. Modify the Lambda function to write the API operation name, response code, and version number as a log line to an Amazon CloudWatch Logs log group. Configure a CloudWatch Logs metric filter that increments a metric for each API operation name. Specify response code and application version as dimensions for the metric.
  2. Modify the Lambda function to write the API operation name, response code, and version number as a log line to an Amazon CloudWatch Logs log group. Configure a CloudWatch Logs Insights query to populate CloudWatch metrics from the log lines. Specify response code and application version as dimensions for the metric.
  3. Configure the ALB access logs to write to an Amazon CloudWatch Logs log group. Modify the Lambda function to respond to the ALB with the API operation name, response code, and version number as response metadata. Configure a CloudWatch Logs metric filter that increments a metric for each API operation name. Specify response code and application version as dimensions for the metric.
  4. Configure AWS X-Ray integration on the Lambda function. Modify the Lambda function to create an X-Ray subsegment with the API operation name, response code, and version number. Configure X-Ray insights to extract an aggregated metric for each API operation name and to publish the metric to Amazon CloudWatch. Specify response code and application version as dimensions for the metric.
Show answerA — Modify the Lambda function to write the API operation name, response code, and version number as a log line to an Amazon CloudWatch Logs log group. Configure a CloudWatch Logs metric filter that increments a metric for each API operation name. Specify response code and application version as dimensions for the metric.
CloudWatch Logs metric filters can parse log lines and emit custom metrics with dimensions such as response code and application version, giving exactly the per-operation, per-version breakdown required. CloudWatch Logs Insights is query-only and cannot populate CloudWatch metrics, so option B fails. ALB access logs do not contain the custom user-agent-derived version data or the operation name produced inside the Lambda function, and ALB logs go to S3, so option C fails. X-Ray subsegments and X-Ray insights provide tracing analysis, not CloudWatch metrics with custom dimensions, so option D is wrong.
A company provides an application to customers. The application has an Amazon API Gateway REST API that invokes an AWS Lambda function. On initialization, the Lambda function loads a large amount of data from an Amazon DynamoDB table. The data load process results in long cold-start times of 8-10 seconds. The DynamoDB table has DynamoDB Accelerator (DAX) configured. Customers report that the application intermittently takes a long time to respond to requests. The application receives thousands of requests throughout the day. In the middle of the day, the application experiences 10 times more requests than at any other time of the day. Near the end of the day, the application's request volume decreases to 10% of its normal total. A DevOps engineer needs to reduce the latency of the Lambda function at all times of the day. Which solution will meet these requirements?
  1. Configure provisioned concurrency on the Lambda function with a concurrency value of 1. Delete the DAX cluster for the DynamoDB table.
  2. Configure reserved concurrency on the Lambda function with a concurrency value of 0.
  3. Configure provisioned concurrency on the Lambda function. Configure AWS Application Auto Scaling on the Lambda function with provisioned concurrency values set to a minimum of 1 and a maximum of 100.
  4. Configure reserved concurrency on the Lambda function. Configure AWS Application Auto Scaling on the API Gateway API with a reserved concurrency maximum value of 100.
Show answerC — Configure provisioned concurrency on the Lambda function. Configure AWS Application Auto Scaling on the Lambda function with provisioned concurrency values set to a minimum of 1 and a maximum of 100.
Provisioned concurrency keeps Lambda execution environments initialized and warm, eliminating the 8-10 second cold start. Combining it with Application Auto Scaling lets provisioned concurrency scale between a minimum of 1 and a maximum of 100 to match demand. Option A hardcodes a concurrency of 1, which cannot handle load spikes, and deleting DAX removes caching for no benefit. Option B sets reserved concurrency to 0, which disables the function entirely. Option D is wrong because reserved concurrency does not pre-warm environments, and Application Auto Scaling does not apply to API Gateway in that manner.
A company is adopting AWS CodeDeploy to automate its application deployments for a Java-Apache Tomcat application with an Apache Webserver. The development team started with a proof of concept, created a deployment group for a developer environment, and performed functional tests within the application. After completion, the team will create additional deployment groups for staging and production. The current log level is configured within the Apache settings, but the team wants to change this configuration dynamically when the deployment occurs, so that they can set different log level configurations depending on the deployment group without having a different application revision for each group. How can these requirements be met with the LEAST management overhead and without requiring different script versions for each deployment group?
  1. Tag the Amazon EC2 instances depending on the deployment group. Then place a script into the application revision that calls the metadata service and the EC2 API to identify which deployment group the instance is part of. Use this information to configure the log level settings. Reference the script as part of the AfterInstall lifecycle hook in the appspec.yml file.
  2. Create a script that uses the CodeDeploy environment variable DEPLOYMENT_GROUP_ NAME to identify which deployment group the instance is part of. Use this information to configure the log level settings. Reference this script as part of the BeforeInstall lifecycle hook in the appspec.yml file.
  3. Create a CodeDeploy custom environment variable for each environment. Then place a script into the application revision that checks this environment variable to identify which deployment group the instance is part of. Use this information to configure the log level settings. Reference this script as part of the ValidateService lifecycle hook in the appspec.yml file.
  4. Create a script that uses the CodeDeploy environment variable DEPLOYMENT_GROUP_ID to identify which deployment group the instance is part of to configure the log level settings. Reference this script as part of the Install lifecycle hook in the appspec.yml file.
Show answerB — Create a script that uses the CodeDeploy environment variable DEPLOYMENT_GROUP_ NAME to identify which deployment group the instance is part of. Use this information to configure the log level settings. Reference this script as part of the BeforeInstall lifecycle hook in the appspec.yml file.
CodeDeploy automatically sets the DEPLOYMENT_GROUP_NAME environment variable during a deployment, so a script referenced in the BeforeInstall hook can read it and adjust the log level before the application is installed. Option A is unnecessarily complex, requiring metadata lookups and EC2 API calls when the information is already provided. Option C invents a custom environment variable feature that CodeDeploy does not offer. Option D uses the Install lifecycle hook, which is intended for copying files, and configuration changes should occur in BeforeInstall; additionally DEPLOYMENT_GROUP_NAME is the correct variable to use.

Access plans

AccessPrice
3 months$8.99$3.99
1 year$14.99$8.99
Lifetime$24.99$14.99
Practice DOP-C02 now →
Free preview inside — try 5 questions before you pay anything.

FAQ

How many practice questions are in this DOP-C02 bank?
460 questions covering the current DOP-C02 AWS Certified DevOps Engineer - Professional syllabus, every one with the correct answer and an explanation.
How long is the real DOP-C02 exam?
The official DOP-C02 exam gives you 180 minutes. Our timed exam mode uses the same limit so the pace feels familiar.
What does DOP-C02 access cost?
Plans start at $3.99 for 3 months. One payment, no subscription — and far cheaper than retaking the real exam.