Amazon simple notification service for web apps - amazon-web-services

I want to receive notifications using amazon simple notification service in my android,iOs and web apps. I found, how to enable this in android and ios, but could someone please help me that is it possible to do the same in my web app(node js)? If yes, then how??
Thanks

Have a look at the following gist -> https://gist.github.com/tmarshall/6149ed2475f964cda3f5
It shows you how to interface with SNS from a Node.js app.
And here is the documentation to the SDK itself - http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SNS.html

You would need to support receiving or subscribing to the SNS notifications in the web app. iOS and Android come with services to process push notifications, you would have to build this for your app.
You can send SNS to an http endpoint but it may be easier for you to send notifications to SQS for your node app to consume.
I can't find an npm package for subscribing to SNS but there is a good blog post here https://deepstream.io/blog/publishing-aws-sns-messages-to-browsers-tutorial/

Related

Ionic+Capacitor Push Notifications via Amazon SNS

How to use Ionic+Capacitor to register Push Notifications via Amazon SNS
Any guide on how to properly use ionic and capacitor to acquire tokens for SNS? I’ve seen the PushNotifications plugin but I’m not sure what “register” does? Do i have to setup my firebase and apn if im only using Amazon SNS?
Any guide/tips or overview steps will be useful.
Thanks
Hoping this would help anyone starting their Ionic+Capactior + FCM/APN + Amazon SNS journey
Device Token Setup
Follow this guide: https://capacitorjs.com/docs/guides/push-notifications-firebase. Follow all of them except all of the iOS Firebase ones (unless youre planning to use FCM to push to iOS as well)
Everytime the plugin runs, it should return a device token, log that or save that somewhere.
SNS Platform Setup
Feel free to follow any guide that teaches you how to create an FCM endpoint and an APNS endpoint. They're pretty straightforward, Cloud Messaging URL for FCM and a .p8 APNS key for iOS.
SNS Endpoint
Open your created platform application and Create a new endpoint, just chuck in the device token from the plugin. FCM and APNS have different token formats, APNS are mostly alphanumeric and all caps, while FCM are with special chars and mix of capital and small letters.
Of course this is just to establish a base point, I'm still working on trying to make them into services to actually push notifications via code. Good luck!

AWS SNS in Flutter

I wonder if maybe anyone has worked with aws push notifications with flutter for ios, android and huawei platforms. If so, what plugins have they used?
If you have documentation on this topic, I would appreciate it if you share it.
You can use SNS Mobile Push notification in IOS & Android, but not in < Huawei > as I know !!
Visit this docs to understand more: https://aws.amazon.com/sns/faqs/#Mobile_push_notifications
SNS Mobile Push lets you use Simple Notification Service (SNS) to deliver push notifications to # Apple, Google, Fire OS, and Windows devices, as well as Android devices in China with Baidu Cloud Push # . With push notifications, an installed mobile application can notify its users immediately by popping a notification about an event, without opening the application.
AWS Amplify for Flutter
AWS Amplify announces its support for the Flutter framework.
AWS Amplify offers a variety of services such as Authentication, including third party/social media log in, push notifications, storage, GraphQL, Datastore, REST API, Analytics, PubSub, and more.
Visit this article : https://medium.com/flutter-community/aws-amplify-for-flutter-ed7890f75493
AWS amplify do not support notification for flutter.
You can link AWS SNS with your firebase messaging conf and got notification through Firebase notification.
Very good post / tutorial : https://medium.com/iiitians-network/flutter-push-notifications-using-aws-sns-dac464c1edf0

Is it necessary to use Amazon SNS when using Firebase Cloud Messaging (FCM) on AWS to send notifications?

I have an existing mobile app that can receive push notifications and I have an existing backend application that exposes an API for sending notifications to the app. The backend application uses Firebase Cloud Messaging (FCM), so it could be considered a wrapper around FCM. My backend application uses the Firebase Admin SDK to create messages and send them to Firebase. My customers hit an API exposed by my backend application (so, if we assume that the customer is using Postman, then the flow for sending a message is: Postman->My backend application->Firebase->Mobile app).
Until now I have been running my backend application on a local server, and it works fine. But now I need to deploy this on AWS. My question is: is it necessary to use Amazon SNS or not? I don't really need any additional functionality from AWS, I just want AWS to permit the required communication.
For example, I dont need to go to an AWS interface to enter the token to send messages to my phone. I already have an API exposed through my backend for sending messages. So, should I even bother to set up SNS?
I know that at a minimum I will have to make my firebase project google credentials available to my instance on AWS (in a file located at the path specified using GOOGLE_APPLICATION_CREDENTIALS). What other configuration steps would be needed? Thanks a lot.
After some investigation I found that it is not necessary to use Amazon SNS to achieve what I wanted to achieve.
I was able to deploy my server application (which uses Firebase Cloud Message) to AWS, and the messages arrive on the mobile phones without any problem.
I initialized my backend application using the steps described on the Google Firebase site: https://firebase.google.com/docs/admin/setup

Xamarin - How to add endpoints automatically to Amazon SNS

I am working on an Android and iOS app using Xamaring and I want to send push notifications via Amazon SNS.
But I don't know how it works exactly. In my case, the app is a kind of a chat, where there is a plenty of users sending messages to each other.
I wonder how to register automatically the device's token to the Amazon SNS.
Who register the token? The backend or the application side?
And how would I do that?
Note: I'm using NodeJS as backend.
Hopefully you've found it on your own, but the SNS documentation is pretty solid on this front. Work your way through all the docs before you begin. With a Node backend you'll be using the AWS JS library, which is also well documented.
Start here: AWS SNS Mobile Push
then read about token management

Amazon AWS send text messages using C#

I have an AWS account ./ server. How can I send a text message in C# from a desktop app using AWS. I can't seem to find any examples or helpful docs.
thanks
AWS doesn't offer a general purpose SMS messaging platform. It's SNS product does allow SMS as one of the optional delivery methods, but its not useful in a lot of scenarios because it requires users devices to be 'subscribed' before getting text messages.
A better choice for a general purpose SMS messaging solution is going to be Twilio or Clickatel or other similar vendors - both of those can easily send general purpose/custom SMS messages to any cell phone (in countries they support), without the user previously subscribing to the service, using C# from a desktop app.
You need REST API hosted on your AWS EC2. Then you create desktop application that call http request to that service.