Advice: Real-Time Notifications in Angular/Amplify Web App

0

Hi there, like the title says, I'm looking to do real-time notifications to an Angular web app. The web app does leverage Amplify for authentication, but if I have to dig into the plain AWS JS SDK for something Amplify doesn't offer, that's fine by me.

I'm really just in the prototyping phase, someone else on my team will probably end up implementing this, I just want to get it started for them to take some stuff off of their plate, and I've been having a hard time getting started.

In terms of functionality, what I'm looking for is something that we can publish a notification from a lambda, for example, and a user on our Angular front end sees a toast with the notification that the Lambda pushed.

It seems like there are a lot of AWS services that can be used to do this, but I'm starting to feel like there are none that are supposed to. I'm probably wrong, but I'm getting into a bit of analysis paralysis, I think.

-Simple Notification Service: It seems like for push notifications, this is really only intended for native Android/iOS development? And otherwise moreso for notifying one aws service from another so that it can perform an action.
-Pinpoint: I've seen people saying online it can be done with this, but had a hard time getting started
-Appsync: If this can be used, I'm up for it. In the past I tried to use it to get real-time updates from a Dynamo table but I could never actually get it to work in Amplify.
-AWS IoT: I've got some code written for this right now, but I'm finding the AWS setup pretty confusing. I don't really know how to actually define a topic on its own in the console. I've used the Test feature in the console to pub/sub to a topic, but not in a way where I was able to on the front end.

Does anyone have any guidance on this? Like I said, I've got a little analysis paralysis and I really need someone to point me in the right direction. A guide would be great, but so many of the ones I find skim over the the most intricate parts, or use serverless CLI for everything when I need to be able to get this setup through the AWS console.

asked 4 years ago1156 views
1 Answer
0
Accepted Answer

It depends on your use case a lot, but typically when we are thinking about real-time notifications we are thinking about websockets.
So, taking that into consideration you have the following options:
-- Amazon API Gateway websockets
-- AWS AppSync subscriptions
-- AWS IOT topics

I think in the end it's a decision between Amazon API Gateway and AWS AppSync as AWS IOT it's probably not the most suitable for your use case.
Since you are already using AWS Amplify, which has great integration with AWS AppSync you could go that route.

Here's a link to the documentation on how you can leverage AWS AppSync subscriptions with AWS Amplify: https://aws-amplify.github.io/docs/js/api#subscriptions

AWS
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions