Courseiva
Troubleshooting and OptimizationmediumMultiple ChoiceObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A developer monitors an AWS Lambda function that processes records from an Amazon SQS queue and writes results to an Amazon DynamoDB table. CloudWatch Logs show that execution time has increased over the past week, and the function frequently times out at the 5-minute timeout. The function's code has not been changed recently. CloudWatch metrics show a high rate of DynamoDBProvisionedThroughputExceededException errors. The DynamoDB table has 5 write capacity units (WCUs). What action will MOST effectively reduce the function's execution time?

⚠ Common exam trap

Watch out — candidates often assume increasing Lambda timeout or memory will fix performance issues, but the real bottleneck is the DynamoDB write capacity, which directly causes the throttling errors and increased execution time.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Increase the write capacity units (WCUs) on the DynamoDB table.

The high rate of DynamoDBProvisionedThroughputExceededException errors indicates that the Lambda function is being throttled by DynamoDB due to insufficient write capacity. When writes are throttled, the Lambda function must retry, which increases execution time and can lead to timeouts. Increasing the WCUs on the DynamoDB table directly addresses the root cause by allowing the function to write without throttling, thereby reducing execution time.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Increase the Lambda function's timeout to 10 minutes.

    Why it's wrong here

    The core issue is a `DynamoDBProvisionedThroughputExceededException`, indicating the DynamoDB table cannot handle the current write rate. Increasing the Lambda timeout merely extends the period during which the function attempts to write to a throttled DynamoDB table. While this might prevent the Lambda from timing out due to its own execution duration, it will not resolve the underlying DynamoDB throttling, leading to continued retries and potential eventual timeout if the throttling persists.

  • Increase the write capacity units (WCUs) on the DynamoDB table.

    Why this is correct

    The `DynamoDBProvisionedThroughputExceededException` directly signifies that the DynamoDB table's allocated write capacity units (WCUs) are insufficient to handle the incoming write requests. Increasing the WCUs directly addresses this bottleneck by provisioning more throughput for the table. This action allows DynamoDB to process more writes per second, eliminating throttling, reducing Lambda retries, and consequently speeding up the Lambda function's overall execution time.

  • Increase the Lambda function's memory allocation to 3008 MB.

    Why it's wrong here

    Increasing a Lambda function's memory allocation primarily provides more CPU power and memory for the Lambda execution environment itself. While this can improve the function's internal processing speed for compute-intensive tasks, it has no direct impact on external service limitations like DynamoDB throttling. The `DynamoDBProvisionedThroughputExceededException` indicates an external bottleneck, not an internal Lambda performance issue, rendering a memory increase ineffective for this specific problem.

  • Use an Amazon SQS FIFO queue instead of a standard queue for the Lambda trigger.

    Why it's wrong here

    Switching from a standard Amazon SQS queue to a FIFO (First-In, First-Out) queue primarily guarantees message ordering and exactly-once processing. This change does not alter the fundamental rate at which the downstream Lambda function processes messages or the throughput capacity of the target DynamoDB table. The `DynamoDBProvisionedThroughputExceededException` is a capacity issue at the DynamoDB level, entirely unrelated to the message ordering or delivery guarantees provided by SQS queue types.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.