AWS SQS not receiving SNS messages
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
When an SQS queue fails to receive messages from an SNS topic, the issue almost always comes down to permissions, subscription configuration, or message filtering. This is a common integration challenge in AWS, and the root cause can be subtle. This article walks through each possible cause with concrete diagnostic steps and fixes.
How SNS-to-SQS Integration Works
Amazon SNS (Simple Notification Service) publishes messages to topics. Subscribers to those topics receive the messages. When an SQS queue subscribes to an SNS topic, SNS pushes messages directly into the queue. This requires three things to be correct: the subscription must be confirmed, the SQS queue policy must allow SNS to send messages, and the message format must be compatible.
Cause 1: SQS Access Policy Missing SNS Permission
This is the most common cause. The SQS queue must have a resource policy that explicitly allows the SNS topic to send messages to it. Without this policy, SNS silently drops the messages with no error visible on the SNS side.
Check the current queue policy:
If the policy is empty or does not reference your SNS topic, set the correct policy:
Apply it with the CLI:
Cause 2: Subscription Not Confirmed
SNS subscriptions require confirmation. When you subscribe an SQS queue to an SNS topic through the AWS Console, confirmation is automatic. However, if you create the subscription via CLI or SDK, check the subscription status:
Look for the SubscriptionArn field. If it shows PendingConfirmation, the subscription was never confirmed. For SQS subscriptions, confirmation should be automatic as long as the queue policy permits it. If it is stuck, delete and recreate the subscription:
Cause 3: Cross-Account or Cross-Region Misconfiguration
SNS and SQS must be in the same region for a direct subscription. Cross-region delivery is not supported natively. If your topic is in us-east-1 and your queue is in eu-west-1, the subscription will fail silently.
For cross-account setups, the SQS queue policy must explicitly allow the SNS topic from the other account:
Cause 4: Subscription Filter Policy Blocking Messages
If the subscription has a filter policy, messages that do not match the filter attributes are silently discarded. Check the filter policy:
Look for the FilterPolicy attribute. If it exists, verify that the messages you are publishing include the required message attributes:
To remove the filter for testing, set it to an empty JSON object:
Cause 5: SQS Queue Encryption with KMS
If the SQS queue uses server-side encryption with a customer-managed KMS key, SNS must have permission to use that key. Add the following statement to your KMS key policy:
Without this, SNS receives an access denied error when trying to encrypt the message before placing it in the queue, and the message is lost.
Diagnostic Checklist
When messages are not arriving, work through these steps in order:
- Verify the subscription is confirmed (not
PendingConfirmation). - Check the SQS queue access policy for
sqs:SendMessagepermission fromsns.amazonaws.com. - Confirm both resources are in the same region.
- Look for a filter policy on the subscription and verify message attributes match.
- If the queue uses KMS encryption, check the key policy.
- Publish a test message and immediately poll the queue to isolate timing issues.
- Check CloudWatch metrics for
NumberOfMessagesPublishedon the SNS topic andNumberOfMessagesSenton the SQS queue.
Common Pitfalls
Using Raw Message Delivery on the subscription changes the message format. Without it, SNS wraps the message in a JSON envelope that includes the topic ARN, message ID, and other metadata. Consumers that parse the raw message body without accounting for this envelope will fail to extract the actual content.
Another subtle issue is the SQS visibility timeout. If another consumer is processing messages from the same queue, messages may not be visible to your polling process. Check if there are other consumers attached to the queue that might be receiving and not deleting the messages.
Summary
When SQS is not receiving SNS messages, start with the SQS queue access policy, since a missing sqs:SendMessage permission for sns.amazonaws.com is the most common root cause. Then verify subscription confirmation, check for filter policies, confirm both services are in the same region, and review KMS key policies if encryption is enabled. Use CloudWatch metrics to confirm whether SNS is successfully delivering messages or encountering errors.
Related reading
- AWS SQS trigger Step Functions
- AWS ssh access 'Permission denied publickey' issue
- AWS SSL security error curl 60 SSL certificate prob... unable to get local issuer certificate
- aws ssm get-parameter rsa key output to file
- AWS System Manager start session An error occurred TargetNotConnected when calling the StartSession operation instance_id is not connected
- AWS The config profile MyName could not be found
- AWS SSO login to credentials as environment variables
- AWS step functions and optional parameters

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.