Questions tagged [amazon-sns]

Amazon Simple Notification Service is a highly available, cloud hosted publish/subscribe manager.

Amazon Simple Notification Service is a highly available, cloud hosted publish/subscribe manager. A user creates an SNS topic and other users subscribe to it. When a message is published to a topic it is pushed to each subscriber.

2929 questions
22
votes
2 answers

Send SMS with AWS Javascript SDK

I want to send an SMS with the AWS javascript sdk with a verification code. var AWS = require('aws-sdk'); AWS.config.region = 'us-east-1'; var sns = new AWS.SNS(); var params = { Message: 'this is a test message', MessageStructure: 'string', …
ozzieisaacs
  • 833
  • 2
  • 11
  • 23
21
votes
2 answers

How you Reference the function ARN of a Function (Lambda) in serverless.yml file?

Considering this lambda function on a serverless.yml file: functions: s3toEc2Lambda: handler: s3toec2lambda.S3toEc2Lambda name: "${self:service}-s3toEc2Lambda" role: S3toEc2LambdaRole And considering this SNS created on resources…
21
votes
4 answers

How to let AWS lambda in a VPC to publish SNS notification?

I have a lambda function that accesses my Postgres db in RDS via VPC. After it queries the db, I want to post a notification to SNS. Because my lambda function exists in my VPC, it cannot access SNS. I have an internet gateway on my VPC. I read…
lawrence
  • 323
  • 1
  • 2
  • 8
21
votes
1 answer

How to send batches of million push notifications using Amazon Simple Notification Service (SNS)

Like many companies, the one I work for isn't comfortable in using Apple's APNS: No official library, stream that get cut-off randomly, etc... The same goes for Android's push system: Limited to small batches, completely different to Apple's APNS...…
21
votes
5 answers

How do you access an Amazon SNS post body with Express / Node.js

I'm in the process of rebuilding a PHP app in Node.js on top of the Express framework. One part of the application is a callback url that an Amazon SNS notification is posted to. The POST body from SNS is currently read in the following way in PHP…
timstermatic
  • 1,710
  • 14
  • 32
20
votes
4 answers

How to create a SNS Filter Policy that matches nested message attributes?

I've created an SNS topic, and I'd like to subscribe to it with a filter policy that matches a nested attribute. For example, given a message like this: { "foo": { "bar": "baz" }, "quux": "vorp" } I'd like to match only messages where the…
Lucas Wilson-Richter
  • 2,274
  • 1
  • 18
  • 24
20
votes
2 answers

Amazon Pinpoint vs. Amazon SES/SMS

I would like to send a verification code to a specific user (only one) via email or text message. I have successfully done so through Amazon SES but I have not attempted through Amazon SMS yet. I have found myself going down the rabbit hole of…
mfs_1990
  • 203
  • 1
  • 2
  • 6
20
votes
1 answer

Send an SMS via AWS SNS using boto3 in an AWS Lambda function?

I would like to send an SMS message from an AWS Lambda function using the boto3 publish method to notify the user of issues via SMS. My lambda function is written in Python and I am using the boto3 module. My lambda function has full rights to SNS.…
kelflanagan
  • 305
  • 1
  • 2
  • 8
20
votes
2 answers

Can't create a SNS Event source on a Lambda function using CloudFormation

This is the Cloudformation template code related to my problem: "SNSTopic": { "Type": "AWS::SNS::Topic", "Properties": { "TopicName": "JumpboxPresenceTopic", "DisplayName": "Jumpbox Presence Topic", "Subscription": [ { …
20
votes
2 answers

Amazon SNS: How to get EndpointArn by token(registrationId) using amazon .net sdk?

I am trying to get EndpointArn by registration id using aws .net sdk. But i couldn't find a nice way to do it. My first attempt was running CreatePlatformEndpointRequest with the same registrationId, which is registered to SNS Application before,…
20
votes
3 answers

Routing messages from Amazon SNS to SQS with filtering

In RabbitMQ, one can create an exchange, then bind it to multiple queues, each with a routing key. This enables messaging architectures like this: message_x / | \ foo-msg_q bar-msg_q msg-logger_q Clients publish…
Josh Glover
  • 25,142
  • 27
  • 92
  • 129
19
votes
2 answers

Why do I get an error when trying to add an SNS trigger to my AWS Lambda function?

I'm trying to setup an AWS Lambda function that gets triggered when a CloudWatch alarm sends a message to an SNS topic. I'm following along in this…
gib65
  • 1,709
  • 3
  • 24
  • 58
19
votes
4 answers

Is it possible to integrate AWS SNS and AWS SQS FIFO queue

With the introduction of FIFO queues in SQS we are guaranteed that SQS messages will be delivered in order. Now, could there be an out-of-order delivery when I publish messages through SNS? Here's what I'm thinking that could happen: _____ …
jlhonora
  • 10,179
  • 10
  • 46
  • 70
19
votes
6 answers

how to connect a cloudwatch alarm to a lambda function

How do you connect an aws cloud watch alarm to a lambda function invocation? I am programmatically adding a cloud watch alarm to the ELBs that we create as part of a cloud formation stack via AWS CloudFormation Templates. I want to have the alerts…
19
votes
2 answers

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 Python library, and I've figured out how to send…