Courseiva
Development with AWS ServiceshardMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer wants a Lambda function to process SQS messages in batches but avoid losing the whole batch when only one record fails. Which feature should be enabled?

⚠ Common exam trap

A common mix-up: candidates confuse partial batch response with SQS dead-letter queues or retry policies, but the key differentiator is that partial batch response is a Lambda event source mapping feature that specifically allows per-message failure handling within a batch.

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

Partial batch response for SQS event source mapping

Partial batch response for SQS event source mapping allows the Lambda function to report which messages in a batch failed processing. When enabled, Lambda retries only the failed messages instead of the entire batch, preventing successful messages from being reprocessed or lost. This is achieved by returning a `batchItemFailures` array in the function's response, which tells Lambda which message IDs to retry.

Answer analysis

Option-by-option breakdown

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

  • Partial batch response for SQS event source mapping

    Why this is correct

    Partial batch response for SQS event source mapping directly addresses the challenge of handling failures within a batch of messages processed by a Lambda function. When enabled, the Lambda function can return a list of message IDs that failed processing, allowing SQS to only return those specific messages to the queue for retry. This prevents successful messages within the same batch from being reprocessed, significantly improving efficiency, reducing costs, and simplifying error handling logic.

  • Reserved concurrency of one

    Why it's wrong here

    Reserved concurrency of one limits a Lambda function to a single concurrent execution at any given time. While this ensures sequential processing, it severely restricts the function's throughput and ability to scale with incoming SQS message volume, potentially causing message backlogs. This setting does not provide a mechanism for the Lambda function to selectively acknowledge successful messages within a batch while retrying only the failed ones, which is the core problem partial batch responses solve.

  • Maximum message size increase

    Why it's wrong here

    Increasing the maximum message size for an SQS queue allows individual messages to contain more data, up to 256KB. This feature is relevant when the content of a single message exceeds the default size limit. However, it does not influence how a Lambda function processes multiple messages within a batch, nor does it provide any mechanism to manage partial failures or prevent reprocessing of successfully handled messages from a batch. It addresses message content size, not batch processing logic.

  • SQS short polling

    Why it's wrong here

    SQS short polling instructs the Lambda event source mapping to immediately return messages, even if the queue is empty, potentially leading to more frequent empty responses and increased API costs. While it affects the latency of message retrieval, it does not provide any functionality for the Lambda function to report partial success or failure within a batch of messages. Short polling is generally less efficient than long polling for most SQS-Lambda integrations and does not solve the problem of selective message reprocessing.

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

Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.