I am developing IOS and node.js application. And I want to use the push-notifications service. Finally, I decided to use Amazon's sns service.
And I want to send a push service to all registered devices at a specific time, one at a time. I do not know if Amazon's sns service can do it. Is this possible? If not, would I be better off using Firebases?
This can be done using Amazon CloudWatch Events. CloudWatch Events can invoke a SNS topic on a schedule that is user defined.
Related
I have a few APIs written in NodeJs using Express, Which are hosted on AWS EC2, What can I do to get an email whenever my APIs go down? Can I use any service of AWS like CloudWatch to send an Email when my API crashes?
Consider using CloudWatch's synthetic monitoring to:
create canaries, configurable scripts that run on a schedule, to monitor your endpoints and APIs. Canaries follow the same routes and perform the same actions as a customer, which makes it possible for you to continually verify your customer experience even when you don't have any customer traffic on your applications. By using canaries, you can discover issues before your customers do.
You can monitor canary events with EventBridge and send custom notifications, including email.
I'm just a beginner, but isn't SNS the solution you would want for this situation?
On my current architecture, I have a NodeJS application that posts a message on SQS, which triggers a lambda function that (finally) puts the result on MongoDB. While the lambda is running, the NodeJS app pools MongoDB until the status field changes to SUCCESS or FAILED.
I would like to change this architecture to be event-driven rather than relying on pooling. To achieve that I considered changing both the NodeJS app to subscribe to a SNS topic and the Lambda function to post the result to that topic.
However, I faced a challenge when attempting to subscribe to the SNS topic. The subscribe method demands an Endpoint to confirm the subscription, and the NodeJS in question is not exposed (it's not an API). So how could the subscription be confirmed?
I understand that AWS might want to avoid spams by implementing subscription confirmation for SMS and Email, but on this case, the subscriber is a simple application...
Is there any way to subscribe tot he topic without exposing the NodeJS application? Or SNS is not the appropriate solution here?
I have used RabbitMQ for this on the past, but I would rather not deploy an instance and instead leverage a platform-as-a-service type of product.
I'm working on a collaborative document project (basically a clone of google docs), where client-programs post their actions to an API on amazon's API gateway, then receive messages of other client's actions via an SQS queue. The API calls trigger Node.js lambda functions that create a message, publish it to an SNS which then notifies each client's SQS.
My current hurdle is in dynamically creating/destroying SQS queues for these clients as they join/leave a document, however my googlefu is weak and I have failed to find anything that could help me. I'd like to keep the queue management server-side and ideally in lambda, but if that's impossible I will accept other solutions.
You can simply use the AWS SDK for Javascript in your AWS Lambda function (it's already pre-installed there) and use it to manage any kind of AWS resources, e.g. the requested creation and deletion of SQS queues.
Hi I am new to Python as well as AWS SNS services.
I want to develop a Python utility which would perform a role of subscriber as well as publisher to automate some simulations.
I am stuck where I need to design endpoint which would act as a SNS message receiver.
Could you guys please guide me on this topic.
AWS Lambda is a nice service for such scenarios and also it is quite cheap so will keep your AWS bills low.
You need publisher and subscriber for SNS in python so use AWS Lambda which will give you a nice connectivity with AWS SNS and there are few samples for subscribers which will help you in configuring the same.
So now your events get into AWS SNS and through subscription of lambda you can invoke Lambda function and take the action accordingly.
Event ---> SNS ---> Lambda Subscriber ---> Python Functions
Here is a nice reference for the same.
For publisher, you can use scheduled Lambda Function which will keep on pooling for some event to occur and then depending upon event you can send the notification to same SNS endpoint or different.
Event <--(Pooling)- Lambda Publisher(Cron Based) --(Event Occurred)-> SNS
Here is the AWS Tutorial for the same.
I hope this helps.
PS: Just keep in mind that maximum runtime for any Lambda function should not exceed certain limit which is 5 mins currently.
As I know, in AWS, if there's a new message in queue, AWS SNS can call my web API to inform me to get the message, so I don't need to get message by polling the queue to check if there is new message. Does Azure Service Bus topic/subscription has this similar function? Or I only can get the message by polling the subscription to check if there are new messages? Thanks
Not via Web API, but via .NET client library. This is named there the "Event Driven Programming model". And is in .NET Client library since April'2013. You can read more here:
http://msdn.microsoft.com/en-us/library/azure/dn198643.aspx
and here
http://fabriccontroller.net/blog/posts/introducing-the-event-driven-message-programming-model-for-the-windows-azure-service-bus/