CodexBloom - Programming Q&A Platform

AWS SNS Not Delivering Messages to HTTP Endpoint after Policy Update

πŸ‘€ Views: 69 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-18
aws sns http access-policy json

I've been struggling with this for a few days now and could really use some help. I'm attempting to set up This might be a silly question, but I'm experiencing an scenario where my AWS Simple Notification Service (SNS) is not delivering messages to an HTTP endpoint after I updated the access policy. Previously, everything was working fine, but after changing the policy to allow only specific IP addresses to access the SNS topic, the HTTP endpoint stopped receiving notifications. The policy looks like this: ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": "*", "Action": "SNS:Publish", "Resource": "arn:aws:sns:us-east-1:123456789012:MyTopic", "Condition": { "IpAddress": { "aws:SourceIp": "203.0.113.0/24" } } } ] } ``` The HTTP endpoint is behind a load balancer and is accessible over the internet. I have verified that the endpoint is working by triggering it directly via a POST request. However, when I try to send a test message from SNS, I receive the following behavior in the AWS Management Console: ``` Message delivery failed: HTTP Status Code: 403, behavior Message: Access Denied ``` I checked the security groups and network ACLs for the load balancer and everything seems fine. I've also tried temporarily removing the IP condition from the policy to see if that resolves the scenario, but I still receive the same behavior. It seems like the SNS service can’t reach my HTTP endpoint. Can someone guide to troubleshoot this? Are there specific configurations or best practices when securing SNS to HTTP endpoints that I might be missing? This is part of a larger application I'm building. This issue appeared after updating to Json LTS. I'm working on a web app that needs to handle this. What am I doing wrong?