Courseiva

DVA-C02 Troubleshooting and Optimization Practice Question

A company runs a serverless application on AWS using API Gateway, AWS Lambda, and DynamoDB. The application processes user uploads and stores metadata in DynamoDB. Recently, users have reported that some uploads fail with a 500 Internal Server Error. The CloudWatch Logs for the Lambda function show 'ProvisionedThroughputExceededException' errors for DynamoDB, followed by 'Task timed out after 3.00 seconds' errors. The Lambda function has a 3-second timeout and 128 MB of memory. The DynamoDB table has 5 read capacity units and 5 write capacity units. The application uses a single Lambda function that processes each upload synchronously. The company expects a steady increase in uploads. Which combination of actions should a developer take to resolve the errors and prepare for future growth? (Choose TWO.)

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 DynamoDB table's write capacity units to a higher value.

The errors are caused by DynamoDB throttling due to insufficient write capacity. Option A increases write capacity to handle the load. Option C implements retries with exponential backoff to handle occasional throttling without failing. Option B would not help because the errors are from DynamoDB, not Lambda concurrency. Option D would increase latency but not solve throttling. Option E might cause duplicate processing.

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 DynamoDB table's write capacity units to a higher value.

    Why this is correct

    The ProvisionedThroughputExceededException explicitly indicates that the DynamoDB table's allocated write capacity has been surpassed. Increasing the Write Capacity Units (WCUs) directly provisions more throughput for the table, allowing it to handle a higher volume of write requests per second without throttling. This is a direct and effective solution to prevent future throttling errors by scaling the underlying resource.

  • ✗

    Switch the Lambda function to asynchronous invocation with a DLQ.

    Why it's wrong here

    Switching to asynchronous invocation means the API Gateway would return an immediate 202 Accepted response, decoupling the client from the Lambda execution. However, the underlying Lambda function would still encounter the ProvisionedThroughputExceededException when attempting to write to DynamoDB, leading to a processing failure. While a Dead-Letter Queue (DLQ) would capture these failed events for later analysis or reprocessing, the original user request would not be successfully completed and persisted in DynamoDB, which is the core problem.

  • ✓

    Modify the Lambda function to implement retries with exponential backoff on DynamoDB write operations.

    Why this is correct

    Implementing retries with exponential backoff within the Lambda function's code is a robust client-side strategy to handle transient ProvisionedThroughputExceededException errors. This mechanism automatically reattempts failed write operations after increasing delays, allowing the DynamoDB table to recover capacity between attempts. This approach significantly improves the reliability of write operations by gracefully managing temporary throttling without requiring an immediate increase in provisioned capacity.

  • ✗

    Increase the Lambda function's timeout to 30 seconds.

    Why it's wrong here

    Increasing the Lambda function's timeout only extends the maximum duration the function is allowed to run before AWS terminates it. It does not address the root cause of the ProvisionedThroughputExceededException, which is insufficient write capacity in DynamoDB. While a longer timeout might allow for more retry attempts if they were implemented, simply increasing the timeout without retries would only result in the function waiting longer before ultimately failing due to the same throttling error.

  • ✗

    Increase the Lambda function's reserved concurrency to 100.

    Why it's wrong here

    Increasing a Lambda function's reserved concurrency sets a maximum limit on how many concurrent instances of that function can run at any given time. This parameter is used to prevent a single function from consuming all available concurrency in an AWS account or to ensure a minimum level of concurrency for critical functions. However, the ProvisionedThroughputExceededException indicates a bottleneck at the DynamoDB table, not a limitation in Lambda's ability to execute concurrently. Adjusting Lambda concurrency would not resolve the DynamoDB throttling issue.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

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

One of 1,135 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DVA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A DynamoDB application receives ProvisionedThroughputExceededException during predictable daily peaks. The workload is not cacheable. What should be changed?

medium
  • A.Enable S3 Transfer Acceleration
  • ✓ B.Use on-demand capacity or configure autoscaling/scheduled scaling for the table
  • C.Disable CloudWatch metrics
  • D.Move all reads to strongly consistent mode

Why B: The ProvisionedThroughputExceededException indicates that the table's read/write capacity is insufficient during peak loads. Since the workload is predictable but not cacheable, the correct solution is to either switch to on-demand capacity mode, which automatically scales to handle any traffic level, or configure auto scaling with scheduled scaling to match the predictable peaks. This directly addresses the capacity shortfall without requiring application changes.

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.