DVA-C02 Troubleshooting and Optimization: 238 practice questions
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?
- Enable JSON logging for future Lambda invocations.Changing future log output does not query the error events already recorded.
- 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.
- Apply a CloudWatch Logs data protection policy to the log groups.Masking sensitive data does not perform the requested error-field aggregation.
- Inspect service errors and latency in an X-Ray trace map.A dependency map does not aggregate the existing request fields across log groups.
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?
- 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.
- 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.
- 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.
- 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.
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?
- 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.
- 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.
- 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.
- 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.
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?
- Enable CloudTrail data-event logging for Lambda invocations.Invocation audit events do not replace the application fields emitted by the function.
- Apply a CloudWatch Logs data protection policy.Masking sensitive values does not configure the application log format.
- 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.
- Retain plain-text logging and write a Logs Insights parse expression.This explicitly requires the parsing expression the team wants to avoid.
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
- 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.
- 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.
- 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.
- 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.
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?
- 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.
- 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.
- 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.
- 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.
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?
- 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.
- 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.
- 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.
- 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.
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
- 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.
- 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.
- 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.
- 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.
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?
- CloudWatch alarm threshold evaluationThis 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.
- CloudWatch embedded metric format valuesThis mechanism extracts metric values from structured JSON logs for graphs and alarms, rather than exposing request service dependencies and latency paths.
- 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.
- CloudWatch Logs Insights queries over log groupsLogs Insights analyzes log records; the trace map provides the requested service-dependency visualization.
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
- 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.
- AWS Lambda layersLambda layers package shared libraries or dependencies separately from function deployment code. They address dependency packaging and reuse, not local execution or step-through debugging.
- CloudWatch Logs InsightsCloudWatch 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.
- Amazon Q DeveloperCode assistance does not replace the SAM CLI local invocation runtime and debugger attachment.
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?
- 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.
- 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.
- Write supported runtime fields as structured JSON Lambda logs.Arbitrary JSON logs do not declare EMF metric extraction metadata.
- 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.
Use CloudWatch embedded metric format in structured JSON log events.
12. Increase the function's configured memory: Which action is MOST appropriate?
- 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.
- 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.
- 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.
- Configure reserved concurrency.Reserved concurrency reserves capacity and limits maximum concurrent executions, but it does not increase the CPU power allocated to each invocation.
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 — freeOther DVA-C02 domains
- Development with AWS Services — 424 questions →
- Security — 343 questions →
- Deployment — 321 questions →
- All 1326 DVA-C02 questions →