amazon-sns

AWS SNS: SMS started to fail with “Unknown error attempting to reach phone”

偶尔善良 提交于 2019-12-03 17:48:01
问题 Normally our application is sending transactional SMS via us-west-2 and us-east-1. Sending limits are not exceeded. Some days ago sending transactional SMS stopped working. About 12 hours later the AWS CloudWatch logs show the error: " Unknown error attempting to reach phone ". The phone numbers received SMS successfully in the past. The receivers are located in Germany. Unfortunately, the API's response code is 200 (success), even though the SMS is not sent successfully. Very surprisingly,

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

让人想犯罪 __ 提交于 2019-12-03 14:53:16
问题 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.

Invoke AWS Lambda SNS event only after SQS subscription on same topic has been processed

点点圈 提交于 2019-12-03 13:46:30
I would like to implement an Amazon SNS topic which first delivers messages to a SQS queue that is a subscriber on the topic, and then executes an AWS Lambda function that is also a subscriber on the same topic. The Lambda function can then read messages from the SQS queue and process several of them in parallel (hundreds). My question is whether there is any way to guarantee that messages sent to the SNS topic would first be delivered to the SQS queue, and only then to the Lambda function? The purpose of this is to scale to a large number of messages without having to execute the Lambda

Amazon SNS -> SQS message body

扶醉桌前 提交于 2019-12-03 13:06:27
I'm sending a message from an SNS topic to an SQS. When I'm checking the body of the SQS message on my client, the whole of the message metadata is being sent in the SQS body. I.E. if I'm sending a message "Hello World" from the topic, my client is receiving: BenFlowers { "Type" : "Notification", "MessageId" : "84102bd5-8890-4ed5-aeba-c15fafc926dc", "TopicArn" : "arn:aws:sns:eu-west-1:534706846367:HelloWorld", "Message" : "hello World", "Timestamp" : "2012-06-05T13:44:22.360Z", "SignatureVersion" : "1", "Signature" : "Qzh0qXhijBKylaFwc9PGE

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

删除回忆录丶 提交于 2019-12-03 12:06:35
问题 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

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

放肆的年华 提交于 2019-12-03 11:23:44
问题 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, sent by the client(android). With this way, aws api gives you the EndpointArn for this registration id. Amazon: The CreatePlatformEndpoint action is idempotent, so if the requester already owns an endpoint with the same device token and attributes,

Is there a best approach to deploy an architecture to send SMS using a Microservice model?

馋奶兔 提交于 2019-12-03 08:51:45
问题 We have a service within a Backend class, the service looks like: // Setup AWS SNS AWS.config.update({ region: 'eu-west-1', accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY }); var sns = new AWS.SNS(); var params = { Message: "SMS message test", MessageStructure: 'string', PhoneNumber: '0045xxxxxxxx', Subject: 'Alarm', MessageAttributes :{ 'AWS.SNS.SMS.SenderID': { 'DataType': 'String', 'StringValue': 'MySender' }, 'AWS.SNS.SMS.SMSType':

Send an SMS for a cloudwatch Alarm outside of us-east?

﹥>﹥吖頭↗ 提交于 2019-12-03 08:35:07
It looks like AWS does not provide SMS as a protocol for SNS topic subscribers outside of US East. I wanted to hook up my CloudWatch alarms and receive text messages when something breaks but cannot send them to SMS. YES! After some digging I was able to get this to work. It's a little more complicated than just selecting a topic or inputing an alarm but it works great! The key to the solution was using AWS's lambda functions! The flow of data is such: > Alarm triggered > -> Push notification to SNS > -> SNS posts to lambda > -> lambda reposts to SNS on us-east-1 > -> subscriber receives

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

时光怂恿深爱的人放手 提交于 2019-12-03 07:56:23
问题 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

AWS SNS: SMS started to fail with “Unknown error attempting to reach phone”

两盒软妹~` 提交于 2019-12-03 06:37:32
Normally our application is sending transactional SMS via us-west-2 and us-east-1. Sending limits are not exceeded. Some days ago sending transactional SMS stopped working. About 12 hours later the AWS CloudWatch logs show the error: " Unknown error attempting to reach phone ". The phone numbers received SMS successfully in the past. The receivers are located in Germany. Unfortunately, the API's response code is 200 (success), even though the SMS is not sent successfully. Very surprisingly, some SMS is sent successfully. But most SMS are resulting in the before mentioned error. Even sending