Interview Prep/AWS/Route 53, CloudFront, API Gateway and Messaging

An SQS FIFO queue has thousands of messages, but consumers receive nothing for minutes at a time.

AdvancedTroubleshootingRoute 53, CloudFront, API Gateway and Messaging
Answer

Likely causes → FIFO guarantees order per message group. While a message from a group is in flight (received but not deleted), no other message in that group is delivered. If most messages share one MessageGroupId, a single slow or failing message blocks everything behind it until the visibility timeout ends.

Diagnose →

aws sqs get-queue-attributes --queue-url <fifo-url> \
  --attribute-names ApproximateNumberOfMessages ApproximateNumberOfMessagesNotVisible VisibilityTimeout RedrivePolicy
# check producer code: what is MessageGroupId set to?

Fix →

  1. Use a finer-grained group ID (per customer or order), so groups process in parallel
  2. Add a DLQ so poison messages leave the group
  3. Make sure consumers delete or extend visibility promptly

Prevent → Choose the group key for the ordering you really need. Use high-throughput FIFO mode only with many groups.

aws All AWS questions Roadmap: AWS core services

More on Route 53, CloudFront, API Gateway and Messaging