Courseiva
Question 1,283 of 724
Development with AWS ServicesmediumMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A company is building a serverless application using AWS Lambda. The application processes messages from an Amazon SQS queue. The Lambda function is idempotent and handles duplicate messages correctly. The company needs to ensure that messages are processed in the order they were sent. Which solution should the company use?

⚠ Common exam trap

Watch out — candidates often assume a standard SQS queue with a small batch size can maintain order, but standard queues only provide best-effort ordering and can still reorder messages due to retries or distributed processing.

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

Configure the Lambda function to poll an SQS FIFO queue with a batch size of 1.

Amazon SQS FIFO queues guarantee first-in, first-out delivery and exactly-once processing, which ensures messages are processed in the order they were sent. By configuring the Lambda function to poll the FIFO queue with a batch size of 1, each message is processed individually, preserving strict ordering without concurrency issues. The Lambda function's idempotency further ensures that any duplicate messages are handled safely, but the FIFO queue's inherent ordering is the key mechanism for maintaining sequence.

Answer analysis

Option-by-option breakdown

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

  • Use Amazon SNS to fan out messages to Lambda.

    Why it's wrong here

    Amazon SNS is a publish/subscribe service optimized for high-throughput, fan-out messaging to multiple subscribers. It does not guarantee the order in which messages are delivered to its subscribers, nor does it inherently provide exactly-once delivery semantics. Therefore, relying on SNS as the direct event source for a Lambda function when strict message ordering and exactly-once processing are required would not satisfy the application's fundamental requirements.

  • Use Amazon Kinesis Data Streams as the event source for Lambda.

    Why it's wrong here

    Amazon Kinesis Data Streams provides strong ordering guarantees for records within a single shard based on the partition key. However, it does not guarantee global message ordering across multiple shards. If the application requires strict processing order for all messages irrespective of their partition key, or if messages are distributed across different shards, Kinesis cannot ensure that these messages will be processed in a globally sequential manner by the Lambda function.

  • Configure the Lambda function to poll an SQS standard queue with a batch size of 10.

    Why it's wrong here

    Amazon SQS Standard queues are designed for high throughput and offer at-least-once message delivery, but they explicitly do not guarantee the order in which messages are delivered or processed. Even if the batch size were reduced to 1, a standard queue cannot provide strict first-in, first-out ordering. Using a batch size of 10 further complicates any attempt to infer or enforce processing order within the batch, making it unsuitable for strict ordering requirements.

  • Configure the Lambda function to poll an SQS FIFO queue with a batch size of 1.

    Why this is correct

    Amazon SQS FIFO (First-In, First-Out) queues are specifically engineered to guarantee strict message ordering and exactly-once processing. By configuring the Lambda function to poll a FIFO queue with a batch size of 1, each message is retrieved and processed individually and sequentially. This combination ensures that the processing order by the Lambda function precisely matches the order in which messages were originally sent to the queue, reliably meeting both ordering and exactly-once requirements.

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 creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.