Category Archives: amazon-sns

Apache returning 403 when using Amazon Simple Notification Service Agent

I am having trouble getting the Pay with Amazon IPN working. I have followed the instructions here to setup the endpoints correctly. When I access the endpoint http://example.com/test/testamazon.cfm I get a response of 200. When the Amazon Simple Notification Service Agent tries to make the POST request to the end point it returns a 403.

Some of the troubleshooting I have done is to capture the POST request and use Postman to send a POST request to the endpoint with all the headers (minus the POST body) and it will return 200. I am wondering if there is something inside the POST body that is causing the 403.

I have tried searching for similar issues but the issues I find are related to the verification of the request after it is received to ensure it is signed correctly. I am not to that point yet, I am just writing a phrase to a file so I can see if the request was successful.

Below is a snippet of the access log where it is being denied.

other_vhosts_access.log:example.com:443 10.0.0.84 - - [23/Mar/2017:08:13:27 -0500] "POST /test/testamazon.cfm HTTP/1.1" 403 1150 "-" "Amazon Simple Notification Service Agent"

How to send JSON records from HDFS to Amazon SNS service by spark

I am trying to understand the best possible way to send data from hdfs to amazon sns service.Going through below link

http://spark.apache.org/docs/latest/sql-programming-guide.html#json-datasets

this says Note that the file that is offered as a json file is not a typical JSON file. Each line must contain a separate, self-contained valid JSON object. As a consequence, a regular multi-line JSON file will most often fail.

In my case i have multiple separate json files in a folder and there can be multiple folders. is this possible in spark with current release ? Or any other best way that i can put data to AWS SNS from HDFS ?