AWS AWS Application Integration and Messaging 4 — Questions and Answers
Question 1: A company needs to process messages in strict FIFO order and ensure each message is processed exactly once. Which SQS queue type should they use?
- Standard Queue
- FIFO Queue (Correct answer)
- Dead Letter Queue
- Delay Queue
Correct answer: FIFO Queue
SQS FIFO queues guarantee first-in-first-out ordering and exactly-once processing, unlike Standard queues which offer best-effort ordering.
Question 2: Which Amazon EventBridge feature allows you to replay archived events to a target to debug or reprocess historical data?
- Event Replay (Correct answer)
- Event Archive
- Event Bus
- Event Router
Correct answer: Event Replay
EventBridge Event Replay allows you to replay archived events from a specific time window to an event bus, enabling reprocessing and debugging.
Question 3: An application publishes messages to an SNS topic. Some subscribers need messages delivered immediately, while others need batch processing. What is the best architecture?
- Use two separate SNS topics
- Fan out from SNS to both Lambda and SQS subscribers (Correct answer)
- Use SQS alone with multiple consumers
- Use EventBridge with multiple rules
Correct answer: Fan out from SNS to both Lambda and SQS subscribers
SNS fan-out allows a single topic to deliver to Lambda for immediate processing and SQS for buffered batch processing simultaneously.
Question 4: What is the maximum retention period for messages in an Amazon SQS queue?
- 1 day
- 7 days
- 14 days (Correct answer)
- 30 days
Correct answer: 14 days
Amazon SQS retains messages for a configurable period between 1 minute and 14 days, with the default being 4 days.
Question 5: A developer wants to delay the delivery of new messages to an SQS queue by 90 seconds to allow backend systems to prepare. Which feature enables this?
- Message Timer
- Delivery Delay (Correct answer)
- Visibility Timeout
- Long Polling
Correct answer: Delivery Delay
SQS Delivery Delay (queue-level) or message-level delay timers postpone when a message first becomes visible to consumers by up to 15 minutes.
Question 6: Which AWS service should you use to coordinate multiple AWS services into serverless workflows with branching logic and error handling?
- Amazon SWF
- AWS Step Functions (Correct answer)
- Amazon MQ
- AWS Batch
Correct answer: AWS Step Functions
AWS Step Functions provides a visual workflow service to coordinate distributed applications using state machines with built-in branching, parallel execution, and error handling.
Question 7: An Amazon SQS message fails processing repeatedly and is moved to a dead-letter queue. What is the attribute that controls how many times a message can be received before this happens?
- MaxReceiveCount (Correct answer)
- RetryLimit
- FailureThreshold
- RedrivePolicy
Correct answer: MaxReceiveCount
MaxReceiveCount in the SQS redrive policy defines the number of times a message can be received before being sent to the dead-letter queue.
A company needs to process messages in strict FIFO order and ensure each message is processed exactly once.
Which SQS queue type should they use?