amazon-sns

AWS SQS JSON format when receiving message from SNS with Ruby SDK

北慕城南 提交于 2019-12-24 05:54:19
问题 I have an SQS queue which is subscribed to a SNS topic. When I publish a new notification to the topic, I use the following code (within a Sinatra app): jsonMessage = { "announcement" => { "first_name" => results['first_name'][:s], "last_name" => results['last_name'][:s], "loc_code" => results['location'][:s], "note" => params['note_content'] } } msgid = @announcments_topic.publish(jsonMessage.to_json, {subject: "Note Created", message_structure: 'json' }) When my queue listener picks up this

How can I get the reply of SMS that sent to a mobile device?

╄→гoц情女王★ 提交于 2019-12-24 00:20:38
问题 I am trying with this sample code to send message using SNS API - BasicAWSCredentials cr = new BasicAWSCredentials("MYACCESSKEYS","mySecretKeys"); AmazonSimpleNotificationService sns = new AmazonSimpleNotificationServiceClient(cr); string topicArn = sns.CreateTopic(new CreateTopicRequest { Name = "ses-bounces-topic", }).CreateTopicResult.TopicArn; sns.SetTopicAttributes(new SetTopicAttributesRequest { TopicArn = topicArn, AttributeName = "MyName", AttributeValue = "Sample Notifications" });

Using API Gateway to publish SNS topics / multiple lambda function with API Gateway

强颜欢笑 提交于 2019-12-23 13:09:04
问题 Right now my requirement is, whenever I get data through API, I have to save it into 2-3 different places (for example, into my own DB, into some BI service and also sometimes into a logging DB). I don't know if it's possible to bind a single resource and single method into multiple lambda functions or so. So, my alternate approach was, as I already know how to trigger multiple lambda functions by subscribing to SNS topic, I thought maybe if I can somehow publish to SNS topic from the API

Not able to update cloudformation stack when having AWS SNS:Topic Resource

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 03:34:14
问题 I have create a cloudformation template that creates one SNS::Topic and bunch of other resources. Problem now is that when i try to update the stack, it fails with the following error "Update to resource type AWS::SNS::Topic is not supported" Stack Policy is: { "Statement" : [ { "Effect" : "Deny", "Action" : "Update:*", "Principal": "*", "Resource" : "*", "Condition" : { "StringEquals" : { "ResourceType" : ["AWS::SNS::Topic", "AWS::EC2::Subnet"] } } }, { "Effect" : "Allow", "Action" : "Update

AWS SNS for India

房东的猫 提交于 2019-12-22 09:43:41
问题 I am using the aws sns service to push/send messages for US mobile number and to do so used the below method. a) load sns $sns = new A2Sns(array( 'key' => 'aaaaaaaaaa', 'secret' => 'bbbbbbbbbbbbbbbbb', 'region' => 'us-east-1' )); b) create topic c) set topic attribute d) create subscription But, the same method is not working for Indian mobile number. Is it really possible? If so, what i have to for that? 回答1: When this question was asked in late 2015, non-U.S. mobile numbers were not

When does aws sns sms SENDERID gets changed from custom-id to aws's default-id “NOTICE”?

时光怂恿深爱的人放手 提交于 2019-12-22 09:38:34
问题 I am using aws sns for sending sms to Indian phone numbers since last two months.I am using PHP SDK for api calls. I had sent 7000+ successful messages with custom senderid relating to our company name.But since last 4-5 days same clients/phone no.s are receiving messages with aws's default senderid "NOTICE". I am publishing messages to a topic to send sms. Now in past few pushed messages all clients got default senderid, while in few pushed messages only few clients got default id while

WCF WebInvoke which can accept content-type: text/plain?

岁酱吖の 提交于 2019-12-22 08:57:57
问题 I'm writing a WCF REST service to receive AWS SNS Notification Message with my WCF REST Service. However, WCF REST only supports XML and JSON, but because of legacy reasons Amazon SNS posts their notifications with the Content-Type: text/plain; charset=UTF-8 header, according to the Amazon documentation: POST / HTTP/1.1 Content-Type: text/plain; charset=UTF-8 // ... { "Type" : "Notification", // ... "UnsubscribeURL" : "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&..." } When I call

AWS SNS Publish to specific User via Cognito Identity ID

落花浮王杯 提交于 2019-12-21 20:02:01
问题 What I'm trying to do here is sending a notification via SNS and APNS when a specific user is part of a newly added DynamoDB Item. I want to send it to the users Cognito Identity ID, not to device token. So Lambda should be triggered when the item is added and then go through a list of Cognito Identity IDs, which is also part of the item. Then Lambda is supposed to publish the push notifications to each Cognito Identity ID. All the devices are registered as endpoints within sns. I also keep

CloudWatch alarm to SNS in different region

走远了吗. 提交于 2019-12-21 13:40:14
问题 I'm trying to notify an SNS topic from a CloudWatch alarm that's in a different region. The reason is that I want SMS alerting, which isn't available in the region where my services are. If I enter the ARN of the subscription and save the changes in the console, I get "There was an error saving the alarm. Please try again." Trying again does not help. Using a topic in the local region does work, but that's not what I need. Is there a way to notify a topic in a different region? If not, is

AWS push notification service integration error

元气小坏坏 提交于 2019-12-21 07:00:00
问题 I am trying to integrate Amazon Push Notifications to my iPhone app. I did follow the tutorial provided here correctly. I am getting this error when creating the Platform EndPoint. (Seems a permission issue with identity pool???) CognitoIdentityCredentials is not authorized to perform: SNS:CreatePlatformEndpoint Full message: Error: Error Domain=com.amazonaws.AWSSNSErrorDomain Code=4 "The operation couldn’t be completed. (com.amazonaws.AWSSNSErrorDomain error 4.)" UserInfo=0x165dcef0 {Type