SAA-C03 ยท Decoupling and serverless patterns
Amazon SQS queues
Standard versus FIFO queues, visibility timeout, long polling, dead-letter queues and buffering spikes between producers and consumers.
Key points
- SQS: managed queue; consumers poll, process, delete; bursts wait in the queue.
- Standard: nearly unlimited throughput, at-least-once delivery, best-effort order.
- FIFO: order within a message group, deduplication, exactly-once processing, lower throughput.
- Visibility timeout: hides a received message, default 30 s.
- Long polling: waits up to 20 s, fewer empty responses.
- Dead-letter queue: after maxReceiveCount failed receives.
Source: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-types.html
Practice questions
What is the default visibility timeout of a new Amazon SQS queue?
- 0 seconds
- 30 seconds
- 5 minutes
- 12 hours
Show answer
Answer: B. 30 seconds
A new queue hides a received message for 30 seconds unless you change the setting. 0 seconds would make the message visible again immediately, and the other values are not the default.
Which statements about Amazon SQS FIFO queues are correct?
- Messages are delivered in order within the same message group
- Deduplication IDs prevent duplicates introduced by producer retries
- They offer nearly unlimited API calls per second by default
- Order is guaranteed across all message groups of the queue
- With batches of 10, they handle up to 3,000 messages per second per API method
Show answer
Answer: A. Messages are delivered in order within the same message group, B. Deduplication IDs prevent duplicates introduced by producer retries, E. With batches of 10, they handle up to 3,000 messages per second per API method
FIFO queues keep order inside each message group, deduplicate with MessageDeduplicationId or content-based deduplication, and reach 3,000 messages per second per API method when every call carries a batch of 10. Nearly unlimited throughput belongs to standard queues, and order is not global across different message groups.
A standard SQS queue guarantees that each message is delivered to consumers exactly once.
Show answer
Answer: False
False. Standard queues promise at-least-once delivery, so a message can occasionally arrive twice; consumers should be idempotent. Deduplicated, exactly-once processing is a FIFO feature.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
