amazon-sns

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

被刻印的时光 ゝ 提交于 2019-12-07 02:57:27
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:*", "Principal": "*", "Resource" : "*" } ] } CF Template is { "AWSTemplateFormatVersion": "2010-09-09"

Lambda processing same SNS event multiple times?

北城以北 提交于 2019-12-07 02:49:20
问题 I have an AWS Lambda function configured to process SNS events from a single topic. When the function runs it will potentially send out some other notifications and call context.succeed, or context.fail if some error occurs. The problem is the same SNS event seems to be invoking the Lambda multiple times. Looking at the CloudWatch logs I see START RequestId: cd7afdf8-2816-11e6-bca2-6f2e3027c5e1 Version: $LATEST Which eventually ends END RequestId: cd7afdf8-2816-11e6-bca2-6f2e3027c5e1 REPORT

Error when trying to read AWS SNS message

一曲冷凌霜 提交于 2019-12-07 02:10:27
I need to return the message sent by Rekognition to SNS but I get this error in CloudWatch: 'Records': KeyError Traceback (most recent call last): File "/var/task/AnalyzeVideo/lambda_function.py", line 34, in lambda_handler message = event["Records"][0]["Sns"]["Message"] KeyError: 'Records' Code: def detect_labels(bucket, key): response = rekognition.start_label_detection( Video = { "S3Object": { "Bucket": BUCKET, "Name": KEY } }, NotificationChannel = { "SNSTopicArn": TOPIC_ARN, "RoleArn": ROLE_ARN } ) return response def lambda_handler(event, context): reko_response = detect_labels(BUCKET,

How to send HTML mails using Amazon SNS?

ⅰ亾dé卋堺 提交于 2019-12-06 21:13:26
问题 How to send HTML mails using Amazon SNS? or do I need to use SES for that? I went through the documentation but it seems there is no way to send HTML mails using Amazon SNS. 回答1: You can use Amazon SES to send the emails and SNS to trigger the sending process. Suppose you have an app http://myapp.com where the endpoint /api/send-email takes care of sending HTML email trough Amazon SES. You set up an Amazon SNS topic, subscribe the endpoint /api/send-email to receive notifications and when

Where is the option to create platform application in Amazon SNS dashboard?

余生颓废 提交于 2019-12-06 10:34:21
I am on this page Register Your Mobile App with AWS at item 1 of the first subtopic with the heading "To register your mobile app with AWS". The instruction says: Go to https://console.aws.amazon.com/sns/v2/home and choose Create platform application . But when I click on that link, I don't see the option Create platform application . It only has the options Create topic , Create subscription , and Publish message . Apparently some regions don't allow you to create a platform application. I was having this issue as well and I change the region to N. Virginia and it allowed me to create one. 来源

How to subscribe an SNS topic of one account by SQS of another account using boto3?

﹥>﹥吖頭↗ 提交于 2019-12-06 03:19:27
问题 I'm trying to create an SNS topic in one account and attach it to Config Rules. I have 3 such accounts and want to create SNS topic in each of the account. Now i want to subscribe all of the 3 topics of 3 different accounts by SQS of the fourth account. I'm able to do it manually. Can somebody please tell me how it can be done via boto3. Thanks in Advance. 回答1: In order to subscribe a SNS topic present in Account A by an SQS present in Account B using boto3, following is the procedure. In

aws boto sns - get endpoint_arn by device token

試著忘記壹切 提交于 2019-12-06 02:12:35
问题 Currently, If we want to add a device to an SNS application using: ep = SNSConnection.create_platform_endpoint(app_arn,device_token,user_data) There is an option that the device was already added in the past. To verify if the device is already added, we're using: def is_device_registered(device_token): list_of_endpoints = SNSConnection.list_endpoints_by_platform_application(AC.INPLAY_CHAT_APPLICATION_SNS_ARN) all_app_endpoints = list_of_endpoints['ListEndpointsByPlatformApplicationResponse'][

AWS SNS for India

人走茶凉 提交于 2019-12-05 21:45:12
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? When this question was asked in late 2015, non-U.S. mobile numbers were not supported when sending SMS from SNS, and at the time, that was the correct answer to the original question. As

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

谁都会走 提交于 2019-12-05 18:39:03
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 others got my custom id. So, where is the problem? If your destination phone number is in India, your

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

Deadly 提交于 2019-12-05 11:51:38
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 my service with this "text/plain" content type like Amazon, there is an error which says: Request