Courseiva

DVA-C02 Development with AWS Services Practice Question

A developer is working on an application that uses Amazon SQS as a message queue. The application polls the queue using long polling with a wait time of 20 seconds. Recently, the team noticed that messages are being processed multiple times. The application is idempotent, but duplicate processing is causing unnecessary costs. What should the developer do to reduce duplicate message processing?

⚠ Common exam trap

DVA-C02 often tests the misconception that FIFO queues guarantee exactly-once processing universally — candidates pick FIFO without realizing the 5-minute deduplication window and the architectural changes required, when idempotency with DynamoDB is the more practical answer.

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

✓

Use a DynamoDB table to track processed message IDs and ignore duplicates.

SQS standard queues provide at-least-once delivery, so duplicates are expected. Since the application is already idempotent, the developer should track processed message IDs in a DynamoDB table (with conditional writes or TTL) and skip messages already processed. This reduces redundant processing and cost without changing the queue type.

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 a DynamoDB table to track processed message IDs and ignore duplicates.

    Why this is correct

    Using a DynamoDB table to store unique message identifiers (e.g., SQS MessageId or a business transaction ID) allows the consumer to check if a message has already been processed before executing its logic. By performing a conditional write (e.g., PutItem with ConditionExpression attribute_not_exists(id)) to the DynamoDB table, the application ensures that the processing logic for a specific message ID is executed only once, effectively achieving idempotency and eliminating duplicate processing even with SQS's at-least-once delivery.

  • ✗

    Switch to a FIFO queue to enable exactly-once processing.

    Why it's wrong here

    Switching to an SQS FIFO queue provides exactly-once processing by using message deduplication IDs and message group IDs, ensuring messages are processed in a strict order and delivered only once. However, the question only asks to reduce duplicates, not enforce strict ordering or exactly-once processing for all messages, which FIFO queues are designed for. FIFO queues also have lower throughput limits and higher costs compared to standard queues, making them an over-engineered solution if strict ordering and exactly-once processing are not absolute requirements.

  • ✗

    Increase the visibility timeout to a value greater than the maximum processing time.

    Why it's wrong here

    Increasing the visibility timeout ensures that once a consumer receives a message, that message remains hidden from other consumers for a longer duration, reducing the likelihood of multiple consumers attempting to process the same message concurrently. While this mitigates some duplicate processing scenarios, it does not guarantee idempotency. If the consumer crashes *after* processing the message but *before* successfully deleting it from the queue, or if the processing time exceeds the extended timeout, the message will reappear and could be processed again, leading to duplicates.

About these practice questions

This DVA-C02 question is part of Courseiva's 1,135-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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.