Courseiva

DVA-C02 Development with AWS Services Practice Question

A developer is designing a microservice that processes orders. The service must ensure that each order is processed exactly once. The developer uses an SQS queue to decouple the order submission from processing. Which SQS feature should be used to prevent duplicate processing?

⚠ Common exam trap

Watch out — candidates often confuse visibility timeout with deduplication, assuming that hiding a message temporarily prevents duplicates, but visibility timeout only delays reprocessing and does not guarantee exactly-once delivery.

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

✓

FIFO queue with content-based deduplication

A FIFO queue with content-based deduplication ensures that each unique order is processed exactly once. FIFO queues guarantee first-in-first-out delivery and exactly-once processing, while content-based deduplication uses the message body to generate a deduplication ID, preventing duplicate messages from being added to the queue within a 5-minute deduplication interval.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Standard queue with visibility timeout

    Why it's wrong here

    Standard SQS queues offer at-least-once message delivery, meaning messages can be delivered multiple times, which is unsuitable for exactly-once processing requirements. While a visibility timeout prevents other consumers from processing a message that is currently being handled, it does not prevent SQS from delivering duplicate messages initially or redelivering a message if processing fails or the timeout expires before deletion.

  • ✓

    FIFO queue with content-based deduplication

    Why this is correct

    Amazon SQS FIFO queues are specifically designed to provide exactly-once processing and strict message ordering, crucial for critical operations like order processing. When content-based deduplication is enabled, SQS automatically uses a SHA-256 hash of the message body to identify and prevent duplicate messages from being delivered within a 5-minute deduplication interval. This combination ensures that each unique order request is processed precisely once.

  • ✗

    FIFO queue with a dead-letter queue

    Why it's wrong here

    A Dead-Letter Queue (DLQ) is primarily an error handling mechanism that captures messages that a consumer fails to process successfully after a configured number of retries. While a FIFO queue itself offers exactly-once processing guarantees, attaching a DLQ addresses message processing failures and prevents 'poison pill' messages from blocking the queue. However, the DLQ mechanism does not inherently provide deduplication capabilities for incoming messages to the primary queue.

  • ✗

    Standard queue with message retention period

    Why it's wrong here

    A Standard SQS queue provides best-effort ordering and at-least-once delivery, inherently allowing for duplicate message deliveries. The message retention period simply dictates how long SQS stores a message if it's not deleted by a consumer, ranging from 1 minute to 14 days. This setting has no impact on preventing duplicate message deliveries; it only controls the lifespan of messages within the queue, making it inadequate for exactly-once processing needs.

About these practice questions

Courseiva writes every DVA-C02 question from scratch — 1,135 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.