What is application protocol of SNS subscription? - amazon-web-services

SNS allows subscriber has the following type of protocols
HTTP/S
Lambda
SQS
Email/JSON
Application
not sure what does Application protocol refers to
and how can I fill in the endpoint
(a example is arn:aws:sns:us-east-1:5555555555:endpoint/ADM/application-name/uuid)

SNS -- the way I see it, conceptually -- is really two different products under one AWS service.
HTTP(S), Lambda, SQS, Email, Email/JSON, and SMS (you forgot SMS)
Mobile push notifications (that's "application" -- mobile apps)
For the application protocol, the endpoint is the EndpointArn of a mobile app and device.
http://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html
Unless you are sending a mobile push notification, you don't publish to an EndpointArn. You publish to a TopicArn.
For everything other than mobile push (https, email, sqs, etc.), when you send a message to a topic, it goes to all of the subscribers to the topic. The individual subscribers aren't individually-addressable (unless there's been a big change that I managed to miss; I welcome correction if that is the case).
With mobile push, you can send messages singly to individually-addressable endpoints (EndpointArn) or to all of the endpoints subscribed to a topic.

Related

How to send notifications to a specific user with AWS SNS?

I am developing an app like Dominoes. In which, I would like to send a Push notification to the Customer, when his/her Order is prepared.
I had been using OneSignal to do so (through sending notification to a particular player id), and now we would like to do it with AWS SNS Service, as we are using bunch of different AWS Services too.
We don't want any marketing/bulk push notifications, the SNS Service would do only one thing - send a particular message from the Restaurants' Mobile (using REST API), and it would reach the Customer's mobile.
With OneSignal, we used to give the PlayerID/UserID of the receiver. Does this method apply to AWS SNS too? Also, we could only work with HTTPS POST requests in our platform.
Any help is appreciated :)
Thanks!

Investigate AWS SNS without any side effects?

As you know, we can publish to an SNS events via those channels:
HTTP
HTTPS
Email
Email-JSON
Amazon SQS
AWS Lambda
Platform application endpoint
SMS
Now let's say I want to test a published messsage.
According to the list, I can use a "request catcher service" for Http/s requests, but sometimes the info is too confidential to be published to third party services.
The email solution is too side effecty. Also writing lambda involves writing code.
Connecting an SQS to inspect messages is causing me to create a special SQS just for testing...
Question:
Is there any option to submit to an SNS and to inspect the message in logs or something like that? Or am I limited only to this list? I'm talking only for dev purposes.

Looking for PubSub messaging for end-clients on AWS

Does AWS offer a service for real-time publish&subscribe messaging for end clients? (web, mobile, desktop).
I'm looking for something that is topic based, optionally with a statfull model of data, where clients can subscribe to topics, receive data published on these topics at real time, etc.
(similar to what Google Firebase offers).
Thanks.
Yes. Amazon Simple Notification Service (SNS) provides:
Topic creation
Publishing of messages to the topic
Subscription to a topic via:
Email
HTTP/S endpoint (effectively, a REST call)
SMS
Sending to an Amazon SQS queue
Triggering an AWS Lambda function
Sending mobile notifications (iOS, Android, Baidu, Windows mobile, Windows desktop, Mac desktop)

SNS Batch Publish

I see AWS publish API for sending push notifications to devices.
http://docs.aws.amazon.com/sns/latest/api/API_Publish.html
According to:
https://aws.amazon.com/blogs/aws/push-notifications-to-mobile-devices-using-amazon-sns/
We can
"Send messages directly to a specific device by calling the Publish function with the device’s ARN. You can easily scale this to handle millions of users by storing the endpoint ARNs in Amazon DynamoDB and using multi-threaded code on the server."
If I want to send push notifs to 100K users (who haven't registered to a specific topic), is there a multi-publish (or batch-publish) API, where I don't need to call the "Push notifications" API for every single user?
probably not. the devices need to be registered (i.e. for SNS you actually have to create the endpoint for each device).
After you have the endpoint you can subscribe them to either one or multiple SNS endpoint and start publishing notifications through them.

Amazon SNS topic subscription confirmation for mobile apps

I'd like to understand how amazon SNS confirms endpoint subscription in case of mobile apps.
For SMS, HTTP or email enpoints, we can assume a confirmation SMS, call and email is sent.
But for apps, SNS seems to be managing all notifications through third party services like GCM, APNS etc.
Say I have a GCM client and server ready.
My client wants to subscribe to a topic. How is the confirmation message sent to the device?
Amazon SNS auto-confirms mobile endpoints like GCM, APNs etc. From the Amazon SNS FAQ,
Q: Does enabling push notifications require any special confirmations
with SNS Mobile Push?
No, they do not. End-users opt-in to receive push notifications when
they first run an app, whether or not SNS delivers the push
notifications.