Messages keep landing in the SQS dead-letter queue even though consumers look healthy.
IntermediateTroubleshootingRoute 53, CloudFront, API Gateway and Messaging
Answer
Likely causes → Each message was received maxReceiveCount times without being deleted. Reasons: consumers crash or time out on certain payloads ("poison messages"), the visibility timeout is too short, or the code never calls DeleteMessage.
Diagnose →
aws sqs get-queue-attributes --queue-url <main-url> --attribute-names RedrivePolicy VisibilityTimeout
aws sqs receive-message --queue-url <dlq-url> --max-number-of-messages 5 \
--attribute-names ApproximateReceiveCount --message-attribute-names All
Fix →
- Inspect the DLQ payloads, and fix the parser or the code path
- Make sure consumers delete messages only after success
- Once fixed, redrive:
aws sqs start-message-move-task --source-arn <dlq-arn> --destination-arn <main-arn>
Prevent → Alarm on ApproximateNumberOfMessagesVisible above 0 on every DLQ, and log the message ID on failures.
More on Route 53, CloudFront, API Gateway and Messaging
You created a public hosted zone and records for `example.com`, but `dig example.com` returns `NXDOMAIN` or old records.Beginner`InvalidChangeBatch: RRSet of type CNAME with DNS name example.com. is not permitted at apex in zone example.com.`BeginnerThe primary Region is down, but Route 53 failover records still send traffic to it.IntermediateA Route 53 health check reports `Failure: Connection timed out` for an endpoint that works fine from your laptop.IntermediateYou changed an A record an hour ago, but some users still reach the old server, and a newly created name returned `NXDOMAIN` for a while.AdvancedCloudFront returns `403 AccessDenied` (S3 XML) for every object after you switched the S3 origin to Origin Access Control.Intermediate