Skip to main content
CloudCertPrep
DVA-C02Domain 1: Development with AWS ServicesServerless & APIshardMultiple response

Consumers occasionally fail while processing SQS messages, and some messages are being processed twice. Which TWO configurations help correct this? (Select TWO.)

Choose 2 answers.

A.Set a visibility timeout longer than the max processing time so in-flight messages aren't redelivered early

Correct. Too-short visibility timeouts are the top cause of duplicate processing.

B.Delete each message explicitly after successful processing

Correct. Messages aren't deleted automatically — the consumer must call DeleteMessage.

C.Enable S3 versioning on the queue

S3 versioning is unrelated to SQS.

D.Increase the number of polling consumers

More consumers makes duplicates more likely, not less.

E.Shorten the queue's retention period

Retention period controls how long unread messages live, not visibility.

Why this answer

SQS delivers messages at least once. Correct handling: (1) a visibility timeout that exceeds real processing time so other consumers don't see in-flight messages, and (2) explicit deletion after success — deleting removes the message before its visibility timeout expires.

Correct answers: A, B · Last reviewed 2026-10-26

Official AWS references

Practice this interactively

Answer without seeing the solution first in the Serverless & APIs practice session.

Practice Serverless & APIs