DVA-C02 Troubleshooting and Optimization practice questions
7-day money-back guarantee — full refund within 7 days of purchase if you've completed under 20% of the questions. See pricing →
Certifications Tools Flashcards Career Paths Exam Guides Blog Pricing For Teams About

Language

✓ EnglishDeutschEspañolFrançaisPortuguês
Check readiness — free →

DVA-C02 Troubleshooting and Optimization: 238 practice questions

DVA-C02 238 questions 12 shown free

12 of the 238 Troubleshooting and Optimization questions in the Certsqill DVA-C02 bank, shown in full below. Each one carries an explanation for every option, not just the correct one — the wrong answers are where the marks go.

Preparing for DVA-C02? Take the free 5-min readiness check →

1. Use CloudWatch Logs Insights to query the log groups: Which approach best meets this requirement?

Medium
A developer investigates intermittent errors in a distributed application whose Lambda functions write logs to separate CloudWatch log groups. The developer needs to identify whether the errors correlate with a specific request field and summarize the pattern without exporting the logs. Which approach best meets this requirement?
  1. Enable JSON logging for future Lambda invocations.
    Changing future log output does not query the error events already recorded.
  2. Use CloudWatch Logs Insights to query the log groups, filter error events, and aggregate the request field.
    CloudWatch Logs Insights runs queries over log groups to filter, aggregate, and analyze log events, which directly supports summarizing the error pattern without exporting the logs.
  3. Apply a CloudWatch Logs data protection policy to the log groups.
    Masking sensitive data does not perform the requested error-field aggregation.
  4. Inspect service errors and latency in an X-Ray trace map.
    A dependency map does not aggregate the existing request fields across log groups.
The trap
Distinguish the log-analysis mechanism from telemetry formatting, data protection, and service-dependency visualization.

CloudWatch Logs Insights is designed to query log groups, filter events, and aggregate fields for analysis.

2. Configure provisioned concurrency for the Lambda function: Which configuration should the team use?

Medium
A developer operates a latency-sensitive Lambda function behind an API. Traffic follows a predictable daily schedule, and users experience higher response latency when traffic begins each morning. The function is already within its timeout and memory limits. The team wants initialized execution environments ready before requests arrive, with the least amount of application development effort. Which configuration should the team use?
  1. Configure reserved concurrency for the Lambda function during the expected traffic period.
    Reserved concurrency reserves capacity and limits maximum concurrent executions; it does not prepare initialized environments to reduce startup latency.
  2. Increase the Lambda function’s configured memory during the expected traffic period.
    More memory also provides more CPU, which can improve CPU-, network-, or memory-bound work, but this does not prepare execution environments before requests arrive.
  3. Configure provisioned concurrency for the Lambda function during the expected traffic period.
    Provisioned concurrency prepares Lambda execution environments before invocations arrive, directly addressing startup latency for predictable, latency-sensitive traffic.
  4. Create a CloudWatch alarm that evaluates Lambda latency against a threshold.
    A CloudWatch alarm evaluates a metric and can invoke configured actions when its state changes, but monitoring a latency threshold does not itself prepare Lambda environments before invocations.
The trap
Distinguish provisioned concurrency, which reduces startup latency, from reserved concurrency, which reserves and caps concurrent capacity.

Provisioned concurrency keeps initialized Lambda environments ready before predictable traffic arrives, reducing startup latency.

3. Use ContinueUpdateRollback to complete the failed: Which action should the team take?

Medium
A development team uses CodePipeline to deploy an AWS SAM application. The source and build actions succeed, but the deploy action fails during a CloudFormation stack update. Service output shows that the update failed and the stack is now in UPDATE_ROLLBACK_FAILED. The team must restore the stack to a stable state before retrying the deployment. Which action should the team take?
  1. Modify the CodeBuild buildspec and rerun the completed build action.
    A buildspec defines CodeBuild phases, commands, artifacts, and related settings. The supplied symptom occurs after the build, during CloudFormation rollback, so changing the completed build action does not address the reported state.
  2. Enable automatic rollback on the CodeDeploy deployment group.
    CodeDeploy deployment groups can use alarms and automatic rollback, but this deployment failed in a CloudFormation stack update. A CodeDeploy rollback setting does not complete a failed CloudFormation rollback.
  3. Rerun the CodePipeline deploy action without changing the stack state.
    CodePipeline orders actions and passes artifacts between stages, but rerunning an action does not provide the CloudFormation procedure for a stack already in failed rollback. The rollback state must be addressed first.
  4. Use ContinueUpdateRollback to complete the failed CloudFormation rollback.
    The failure occurred during a CloudFormation update and rollback did not complete. ContinueUpdateRollback is the mechanism identified for handling a failed rollback and restoring stack consistency.
The trap
Distinguish the pipeline orchestrator from the deployment service reporting the failure.

A failed CloudFormation rollback can require ContinueUpdateRollback before the pipeline deployment is retried.

4. Set the Lambda log format to JSON using advanced logging: Which configuration best supports this requirement?

Medium
A Lambda function uses a supported Python runtime and the standard logging library. It emits INFO events with logger.info("order processed", extra={"order_id": order_id, "outcome": outcome}). The log level allows INFO events. CloudWatch Logs Insights must discover order_id and outcome without a custom parsing expression. Which configuration best supports this requirement?
  1. Enable CloudTrail data-event logging for Lambda invocations.
    Invocation audit events do not replace the application fields emitted by the function.
  2. Apply a CloudWatch Logs data protection policy.
    Masking sensitive values does not configure the application log format.
  3. Set the Lambda log format to JSON using advanced logging controls.
    The JSON format preserves fields supplied through the standard logging extra argument as fields in the emitted record.
  4. Retain plain-text logging and write a Logs Insights parse expression.
    This explicitly requires the parsing expression the team wants to avoid.
The trap
Distinguish a mechanism that emits structured logs from tools that query, mask, or record different event types.

Use JSON logging with a supported runtime and logging library.

5. Use an X-Ray trace map to inspect service dependencies: Which capability is MOST useful for identifying whethe

Medium
An API Gateway application shows intermittent HTTP 429 responses and increased end-to-end latency. Which capability is MOST useful for identifying whether an API dependency is causing the latency or throttling?
  1. Use API Gateway token-bucket throttling to control rate and burst targets.
    Token-bucket throttling can protect the API and downstream systems and can produce HTTP 429 responses, but it does not identify which dependency causes latency.
  2. Use an X-Ray trace map to inspect service dependencies, errors, throttling, and latency.
    The X-Ray trace map exposes dependencies and helps isolate the node or edge responsible for failures or latency.
  3. Use CloudWatch Logs Insights to filter and aggregate log events for errors.
    Logs Insights can locate errors and summarize log fields, but it does not provide the service-dependency trace map described for isolating a latency-causing edge.
  4. Use a CloudWatch alarm to evaluate a metric against a threshold and invoke an action.
    A CloudWatch alarm detects threshold breaches and can invoke actions, but it does not expose the dependency path responsible for the latency.
The trap
Use X-Ray trace maps to investigate dependency-level errors, throttling, and latency; use alarms for threshold-based detection and Logs Insights for log analysis.

Use the X-Ray trace map because it reveals service dependencies, throttling, errors, and latency, helping isolate the responsible node or edge.

6. Enable ReportBatchItemFailures on the event source mapping: Which change should the developer make?

Hard
A Lambda function processes batches from an SQS standard queue. Each batch contains 10 messages, and one message intermittently fails after the other nine complete their side effects. The team observes that those nine messages are processed again, increasing duplicate work. The handler is already idempotent, and the team wants to reduce unnecessary retries without changing queue type. Which change should the developer make?
  1. Route failed asynchronous Lambda invocations to an on-failure destination.
    On-failure destinations apply to failed asynchronous Lambda invocations after retry handling. An SQS event source mapping is the integration described here, so this mechanism does not selectively prevent successful records in the SQS batch from being retried.
  2. Replace the standard queue with a FIFO queue using message deduplication.
    FIFO deduplication addresses duplicate sends within its deduplication interval and preserves order within message groups. It does not provide the stated mechanism for preventing successful records in a failed Lambda batch from being retried, and it changes the queue type unnecessarily.
  3. Enable ReportBatchItemFailures on the event source mapping and return only failed message identifiers.
    Both the mapping configuration and a correctly formed batchItemFailures response are needed to retry only failed records.
  4. Increase the queue visibility timeout beyond the batch processing duration.
    A visibility timeout prevents a received message from becoming visible while processing, but it does not stop successfully processed records from being retried when another record causes batch failure. The timeout should align with processing duration, but this symptom requires partial batch reporting.
The trap
For SQS-triggered Lambda batches, distinguish batch failure handling from visibility-timeout configuration and asynchronous invocation destinations.

Enable partial batch failure reporting so only failed SQS records are retried.

7. Define a healthCheck command in the container definition: Where should the developer configure this check?

Medium
An ECS task runs an essential application container. The developer needs ECS to evaluate a command inside the container that fails while a dependency is unavailable. Where should the developer configure this check?
  1. Configure automatic rollback in the CodeDeploy deployment group.
    CodeDeploy can use CloudWatch alarms and automatic rollback for failed deployments, which addresses deployment recovery rather than directly determining whether the running container is ready to receive requests.
  2. Configure Route 53 failover health checking for the service endpoint.
    Route 53 failover routing can direct traffic to a secondary resource when the primary record is unhealthy, but it does not directly test readiness inside the ECS container.
  3. Configure a CloudWatch alarm on an application metric threshold.
    A CloudWatch alarm evaluates a metric against a threshold and can invoke actions when its state changes. It is not the ECS container mechanism that runs a readiness command inside the container.
  4. Define a healthCheck command in the container definition of the ECS task definition.
    ECS evaluates the configured container health check; this is distinct from load-balancer target health and request routing.
The trap
For ECS startup-readiness questions, distinguish an in-container health command from external routing, metric alarms, or deployment rollback.

Define the container health check in the ECS task definition.

8. Run a CloudWatch Logs Insights query that filters: Which approach meets the requirement with the least develop

Medium
A developer investigates increased API latency in a Lambda application. Each invocation writes structured JSON logs containing the request path and duration, and all logs are in one CloudWatch Logs group. The developer must identify which paths have the highest average duration without exporting the logs or changing the application. Which approach meets the requirement with the least development effort?
  1. Use an X-Ray trace map to aggregate the average duration for each request path.
    A trace map summarizes dependencies; a Logs Insights query aggregates the existing log fields.
  2. Run a CloudWatch Logs Insights query that filters and aggregates duration by request path.
    Logs Insights can query the existing log group, filter events, and aggregate fields such as duration by request path, allowing latency patterns to be identified without exporting or modifying the application.
  3. Create CloudWatch metrics from every request-path value by using embedded metric format.
    Embedded metric format extracts metric values from structured JSON log events for graphs and alarms, but creating metrics for this investigation adds metric configuration and does not directly provide the required log aggregation.
  4. Apply a CloudWatch Logs data protection policy to summarize duration by request path.
    Data protection policies audit and mask configured sensitive data identifiers in log events; they reduce exposure of protected data rather than analyze latency fields.
The trap
When the required evidence is already in CloudWatch Logs, prefer Logs Insights for direct filtering and aggregation before adding telemetry or changing application code.

CloudWatch Logs Insights directly filters and aggregates events in the existing log group, making it the least-development-effort method for comparing average duration by path.

9. AWS X-Ray trace-map analysis: Which observability mechanism is the best fit?

Easy
A development team must identify which service dependency causes latency in distributed requests. Which observability mechanism is the best fit?
  1. CloudWatch alarm threshold evaluation
    This mechanism evaluates a metric against a threshold and can invoke configured actions when the state changes; it does not provide the dependency map described in the requirement.
  2. CloudWatch embedded metric format values
    This mechanism extracts metric values from structured JSON logs for graphs and alarms, rather than exposing request service dependencies and latency paths.
  3. AWS X-Ray trace-map analysis
    X-Ray combines trace segments into a trace map that exposes service dependencies, errors, throttling, and latency, helping isolate the responsible node or edge.
  4. CloudWatch Logs Insights queries over log groups
    Logs Insights analyzes log records; the trace map provides the requested service-dependency visualization.
The trap
Choose traces when the question asks where latency or failure occurs across service dependencies.

AWS X-Ray is designed to expose service dependencies and help isolate latency within distributed requests.

10. AWS SAM CLI: Which AWS capability lets a developer test and step-through debug a serverless application locall

Easy
Which AWS capability lets a developer test and step-through debug a serverless application locally before deploying it?
  1. AWS SAM CLI
    The AWS SAM CLI supports local testing and step-through debugging of serverless applications before deployment, enabling a shorter feedback loop for Lambda code and events.
  2. AWS Lambda layers
    Lambda layers package shared libraries or dependencies separately from function deployment code. They address dependency packaging and reuse, not local execution or step-through debugging.
  3. CloudWatch Logs Insights
    CloudWatch Logs Insights queries log groups to filter, aggregate, and analyze log events. That supports analysis of recorded execution data rather than interactive local step-through debugging before deployment.
  4. Amazon Q Developer
    Code assistance does not replace the SAM CLI local invocation runtime and debugger attachment.
The trap
Distinguish local interactive debugging from post-execution log analysis and development assistance.

AWS SAM CLI provides local testing and step-through debugging before deployment.

11. Write structured JSON log events using CloudWatch embedded: Which approach meets this requirement?

Medium
A developer must emit application metric values from code so CloudWatch can use them in graphs and alarms. Which approach meets this requirement?
  1. Query the application log group with CloudWatch Logs Insights.
    Logs Insights can filter, aggregate, and analyze existing log events, but querying logs is not the stated mechanism for emitting metric values from code.
  2. Write structured JSON log events using CloudWatch embedded metric format.
    CloudWatch embedded metric format extracts metric values from structured JSON log events for graphs and alarms.
  3. Write supported runtime fields as structured JSON Lambda logs.
    Arbitrary JSON logs do not declare EMF metric extraction metadata.
  4. Create a CloudWatch alarm with a threshold for the application value.
    An alarm evaluates a metric against a threshold and can invoke actions; it consumes a metric rather than providing the code-level mechanism that emits one.
The trap
Distinguish emitting metric data from analyzing logs or evaluating alarms.

Use CloudWatch embedded metric format in structured JSON log events.

12. Increase the function's configured memory: Which action is MOST appropriate?

Medium
A developer operates a Lambda function that transforms images. Load testing shows that invocations are CPU-bound and frequently approach the configured timeout. The function does not experience cold-start latency, and downstream services are healthy. The developer must improve execution performance by changing the Lambda configuration. Which action is MOST appropriate?
  1. Increase the function's timeout.
    A timeout controls the maximum duration of one invocation but does not add CPU capacity, so this change would not resolve the CPU-bound workload.
  2. Increase the function's configured memory.
    Lambda allocates CPU power in proportion to configured memory, so increasing memory directly addresses a CPU-bound workload and can improve execution performance.
  3. Enable provisioned concurrency.
    Provisioned concurrency prepares execution environments before invocations to reduce startup latency; it does not provide the stated CPU-capacity change for an already warm function.
  4. Configure reserved concurrency.
    Reserved concurrency reserves capacity and limits maximum concurrent executions, but it does not increase the CPU power allocated to each invocation.
The trap
Do not confuse Lambda timeout, provisioned concurrency, or reserved concurrency with per-invocation CPU capacity.

Increase Lambda memory because Lambda allocates CPU power in proportion to configured memory.

226 more Troubleshooting and Optimization questions

The remaining 226 questions in this domain are part of the full DVA-C02 bank — 1326 questions, every option explained. Start with the free five-minute check and see your score per domain.

Test your DVA-C02 readiness — free

Other DVA-C02 domains

Part of the Certsqill DVA-C02 question bank · Troubleshooting and Optimization · Every answer, right and wrong, comes with its own explanation.