Skip to main content

All Questions

Tagged with
19 votes
2 answers
12k views

Format APNS-style JSON message in Python for use with Amazon SNS

I'm creating an iOS app, and for our push notifications, we're using Amazon's Simple Notification Service (SNS). SNS is wonderful, but the documentation is pretty sparse. I'm using boto, Amazon's ...
bryanjclark's user avatar
  • 6,394
8 votes
6 answers
16k views

AWS SNS how to add line breaks in message

I'm trying to send SNS messages via CLI in json format. aws sns publish --cli-input-json "{\"TopicArn\":\"xxx\",\"Message\":\"first line\n second line\",\"Subject\":\"Empty subject\"}" But the \n ...
OrlandoL's user avatar
  • 948
7 votes
1 answer
26k views

How to send json message body in aws SNS using console

I am doing a hands on where I want to add an SNS trigger to a lambda function which then sends a message to a slack channel. There is a blueprint for this lambda in python and also a template test ...
troglodyte07's user avatar
  • 4,056
6 votes
3 answers
10k views

JSON encoding error publishing SNS message with Boto 3

I am trying to send a simple JSON message to an Amazon SNS topic in Boto 3. However, I keep getting a _jsonparsefailure in the tag of the message and I only receive the default value. Here is my code: ...
g_grillz's user avatar
  • 343
5 votes
1 answer
12k views

How to provide JSON inside AWS CLI SNS message?

How to send via aws cli exact JSON structure in command line (NOT via file): aws sns publish --topic-arn "arn:aws:sns:us-east-1:12345:myproject_serverlessscheduler_sns" --message '{"key1":"value1", "...
Joe's user avatar
  • 13k
4 votes
1 answer
2k views

PHP JSON decode Amazon SNS

I'm having issues decoding certain Amazon SNS notifications using PHP's json_decode (5.3.10-1ubuntu3.5) and have not yet been able to figure out why despite the json being marked as valid using ...
JSP's user avatar
  • 571
3 votes
3 answers
22k views

AWS SQS JSON format when receiving message from SNS with Ruby SDK

I have an SQS queue which is subscribed to a SNS topic. When I publish a new notification to the topic, I use the following code (within a Sinatra app): jsonMessage = { "announcement" => { ...
user1825257's user avatar
3 votes
2 answers
886 views

Parsing AWS SNS notification in .net core 1.0

I have a VisualStudio17 serverless application project and am using .net core Web Api. I want to confirm my SNS subscription, but I have a problem that AWS sends the POST request with header content-...
LLL's user avatar
  • 3,761
3 votes
1 answer
8k views

How to send shell script (json) output to aws sns topic?

I have a created an arn topic in AWS console, also created subscription using email and confirmed the subscription. I have an EC2 instance running in AWS, I wrote a small script to send some details ...
Krishna Ghanta Chowdary's user avatar
3 votes
1 answer
1k views

Where is the Token or SubscribeUrl inside the SubscriptionConfirmation request?

I'm trying to accept a subscription confirmation from SNS using node.js. I type my endpoint into the console and hit subscribe. The documentation says After you subscribe an HTTP/HTTPS endpoint,...
user avatar
3 votes
1 answer
974 views

Amazon SNS: JSON toasts to Windows Phones

When I use the Amazon SNS console to send toast messages to a Windows Phone 8 device (i.e. with the MPNS system), I can only send messages in text format. Selecting "Use platform specific JSON message ...
ZeroOne's user avatar
  • 3,151
3 votes
1 answer
499 views

Amazon SNS Console Push notification sending Empty notification

I want to send push notification via GCM to an android phone endpoint. SNS is configured and is ready to send notification.In the SNS console using JSON I sent { "GCM": "{ \"notification\": { \"...
Guhanesh G's user avatar
3 votes
1 answer
779 views

Integrating Amazon SNS with ServiceStack

I'm developing a suite of ETL-style apps which will link cloud-based systems with on-premise systems using Amazon SNS and Amzazon SQS along with some restful services. SNS allows you to set-up an HTTP ...
Neil Dobson's user avatar
  • 1,259
2 votes
1 answer
3k views

How correctly parse SES bounced JSON SNS Notification in Java

I am receiving JSON from SNS topic, which I believe is not correct { "Type":"Notification", "MessageId":"message-id-is-this", "TopicArn":"bouncer.topic.name.here", "Message":"{\"...
PHP Avenger's user avatar
  • 1,791
2 votes
1 answer
2k views

Send Apple Push Notification via AWS Lambda/Python as JSON with custom variable Message

Hello i'm trying to send push notifications like this message3 = {"APNS_SANDBOX":"{\"aps\": {\"alert\": \"some alert\",\"sound\": \"default\",\"badge\": 1},\"message\": \"additional information\",\"...
weka1's user avatar
  • 737

15 30 50 per page