amazon-sns

How to send an SMS with custom sender ID with Amazon SNS and Python and boto3

☆樱花仙子☆ 提交于 2019-12-03 05:34:19
The documentation suggests to use message attributes for that but I can't seem to figure out what attribute name to use. This works so far: sns = boto3.client('sns', region_name='eu-west-1') sns.publish( PhoneNumber='+491701234567', Message='hi there', MessageAttributes={ 'AWS.SNS.SMS.SenderID': { 'DataType': 'String', 'StringValue': 'MySenderID' } } ) The SMS is delivered but with some (random?) value in the sender id field. So it seems my setting of message attributes is silently ignored. What is the correct way to set a custom sender id? The sender id must be 1-11 alpha-numeric characters,

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

非 Y 不嫁゛ 提交于 2019-12-03 04:58:56
This is the Cloudformation template code related to my problem: "SNSTopic": { "Type": "AWS::SNS::Topic", "Properties": { "TopicName": "JumpboxPresenceTopic", "DisplayName": "Jumpbox Presence Topic", "Subscription": [ { "Endpoint": { "Fn::GetAtt": [ "Lambda", "Arn" ] }, "Protocol": "lambda" } ] } }, "Lambda": { "Type": "AWS::Lambda::Function", "Properties": [...] I can see the topic in the SNS dashboard: But it does not display in the lambda function Event Sources panel: The weird thing about this, is that if I create a new subscription from the SNS dashboard for that same lambda function, no

Anyone using Node.js with Amazon SNS and Apple Push Notifications?

那年仲夏 提交于 2019-12-03 03:45:44
问题 I'm looking for examples of using node.js with Amazon SNS and Apple APN push notifications. We use Amazon for our hosting, and I have used SNS before, it's pretty simple. But the examples they have for push notifications are for java, and there is no examples for Node. It's confusing, as usual with them, and I'm hoping to cut my research and time spent short. It can't be that hard. I'm also wondering how they deal with errors, and the differences between the sandbox and production. Apple

How to use AWS SQS/SNS as a push notification queue for heavy processing tasks via PHP?

自古美人都是妖i 提交于 2019-12-03 02:57:16
I have a single server running on rackspace which is hosting a single PHP web app. The PHP web app will accept a form submission that then needs to perform a task based on the form field entries. The task (let's called it the generate metadata task) requires quite a lot of processing time. I was wondering how to allow the form submission to be a straightforward save to database and immediately show success page to user while running the generate metadata task in the background. I have installed "aws/aws-sdk-php": "~3.11" using composer into the same web app. My plan is initially this: code

Amazon SNS Mobile Push - how to bulk subscribe endpoints to a topic?

与世无争的帅哥 提交于 2019-12-03 02:18:40
I am trying to move my existing iOS push notification infrastructure over to amazon SNS mobile push. I exported all my tokens from my local db into an SNS application (using CSV). Now I want to send push notification to all my 10,000 users. I think the only way is to create a topic and subscribe all the users to that topic then publish message to that topic. Is there any easy way to subscribe all the 10,000 users who I have imported into the system to a topic? Thanks for any help! It sounds like you have created the Amazon SNS Platform Application and imported your tokens as Amazon SNS

Send SNS Notification when EC2 instance is rebooted

我怕爱的太早我们不能终老 提交于 2019-12-02 22:10:06
问题 I need help with one AWS Step. I know we can send an SNS Notification when the Instance is Stopped, terminated, starting and pending stages. But how do we send a notification when the EC2 instance is rebooted? Thanks! 回答1: If a reboot is issued within the instance , then this will not be detected by AWS. It is just the operating system doing its own things. If a reboot is issued through the AWS management console or an API call, the instance does not actually change state . From Instance

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

时光总嘲笑我的痴心妄想 提交于 2019-12-02 20:55:23
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. I have this code, sns = boto3.client('sns') sns.publish( PhoneNumber = '+11234567890', Message = 'Simple text message' ) According to the boto3 documentation , the publish method accepts the following parameters, response = client.publish( TopicArn='string', TargetArn='string', PhoneNumber='string', Message='string', Subject='string',

Format APNS-style JSON message in Python for use with Amazon SNS

北城以北 提交于 2019-12-02 20:37:27
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 plain-text push notifications: device_arn = 'MY ENDPOINT ARN GOES HERE' plain_text_message = 'a plaintext message' sns.publish(message=plain_text_message,target_arn=device_arn) However, what's not clear from the documentation is how to create an an Apple Push Notification Service (APNS) message. I need to send a sound and a badge along with the push

Anyone using Node.js with Amazon SNS and Apple Push Notifications?

一个人想着一个人 提交于 2019-12-02 15:58:42
I'm looking for examples of using node.js with Amazon SNS and Apple APN push notifications. We use Amazon for our hosting, and I have used SNS before, it's pretty simple. But the examples they have for push notifications are for java, and there is no examples for Node. It's confusing, as usual with them, and I'm hoping to cut my research and time spent short. It can't be that hard. I'm also wondering how they deal with errors, and the differences between the sandbox and production. Apple reacts differently between the two environments, not failing in the sandbox as they do in production. It

What is the difference between Amazon SNS and Amazon SQS?

偶尔善良 提交于 2019-12-02 13:46:50
I don't understand when I would use SNS versus SQS, and why are they always coupled together? Srikanth SNS is a distributed publish-subscribe system. Messages are pushed to subscribers as and when they are sent by publishers to SNS. SQS is distributed queuing system. Messages are NOT pushed to receivers. Receivers have to poll or pull messages from SQS . Messages can't be received by multiple receivers at the same time. Any one receiver can receive a message, process and delete it. Other receivers do not receive the same message later. Polling inherently introduces some latency in message