Courseiva
Troubleshooting and OptimizationmediumMultiple ChoiceObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A developer notices that an AWS Lambda function processing S3 events is being retried frequently due to throttling errors from Amazon DynamoDB. The function writes records to a DynamoDB table and has reserved concurrency set to 100. The DynamoDB table uses on-demand capacity mode. What should the developer do to reduce retries and improve overall throughput?

⚠ Common exam trap

Candidates often assume increasing Lambda concurrency or switching to provisioned capacity will solve throttling, but the real issue is the retry strategy at the application layer, not the infrastructure scaling.

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

Implement exponential backoff and retry in the Lambda function code for DynamoDB API calls.

Implementing exponential backoff and retry in the Lambda function code for DynamoDB API calls directly addresses the throttling errors. Even with on-demand capacity, DynamoDB can throttle requests if they exceed the table's burst capacity or if there are hot partitions. Exponential backoff reduces the retry rate, allowing DynamoDB to recover and improving overall throughput without changing the Lambda concurrency or capacity mode.

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 reserved concurrency to 500.

    Why it's wrong here

    Increasing the Lambda function's reserved concurrency to 500 would exacerbate the problem. Reserved concurrency limits how many instances of a Lambda function can run simultaneously. If the underlying issue is DynamoDB throttling, increasing Lambda's concurrency will only send a higher volume of concurrent requests to DynamoDB, intensifying the throttling and leading to more failed operations and retries, rather than resolving the root cause. This would likely worsen performance and increase error rates.

  • Implement exponential backoff and retry in the Lambda function code for DynamoDB API calls.

    Why this is correct

    Implementing exponential backoff and retry in the Lambda function code for DynamoDB API calls is the most effective solution. This pattern automatically handles transient errors like throttling by retrying failed requests with progressively longer delays between attempts. This approach allows DynamoDB time to recover from temporary capacity constraints, significantly increasing the success rate of API calls without overwhelming the database, thus making the Lambda function more resilient.

  • Disable the Lambda function's S3 event source mapping and use Amazon SQS to buffer events.

    Why it's wrong here

    Disabling the S3 event source mapping and using Amazon SQS to buffer events, while a valid architectural pattern for decoupling, does not directly solve the immediate problem of DynamoDB throttling. It introduces additional complexity and latency into the processing pipeline. The Lambda function would still need to process messages from SQS and make calls to DynamoDB, where the throttling issue would persist unless retry logic is also implemented within the Lambda. The core issue is the interaction with DynamoDB, not the event source.

  • Switch the DynamoDB table to provisioned capacity with a high write capacity unit setting.

    Why it's wrong here

    Switching the DynamoDB table to provisioned capacity with a high write capacity unit (WCU) setting is an inefficient and potentially costly solution. While it could prevent throttling if set high enough, it requires manual capacity planning and may lead to significant over-provisioning and wasted costs during periods of low S3 event activity. DynamoDB On-Demand capacity mode, which scales automatically, is generally more suitable for variable workloads like S3 event processing, making proper error handling within the function a better approach.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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.