amazon-sns

Amazon SNS multiple subscriptions of the same endpoint

末鹿安然 提交于 2020-01-15 09:55:09
问题 I noticed that if I try to create a subscription between a topic and a SQS queue twice, Amazon actually creates only a single one. aws sns subscribe --topic-arn arn:aws:sns:ap-southeast-2:909420746768:bar --protocol sqs --notification-endpoint arn:aws:sqs:ap-southeast-2:909420746768:foo --region=ap-southeast-2 { "SubscriptionArn": "arn:aws:sns:ap-southeast-2:909420746768:bar:39d8296e-18e3-4367-b10b-edd5af266f69" } -- if I call this command twice, the same SubscriptionArn is returned each time

Amazon SNS: how to get token for confirm subscription

那年仲夏 提交于 2020-01-15 01:50:12
问题 Following creates a subscription waiting to be confirmed. aws_client.subscribe(TopicArn=topic_arn, Protocol=protocol, Endpoint=endpoint) response of this is something like: {'ResponseMetadata': {'HTTPHeaders': {'content-length': '298', 'content-type': 'text/xml', 'date': 'Fri, 13 Oct 2017 10:15:47 GMT', 'x-amzn-requestid': '7a0a40fb-ab72-5584-94f0-12a13fe11das'}, 'HTTPStatusCode': 200, 'RequestId': '7a0a40fb-ab72-5584-94f0-12a13fe11das', 'RetryAttempts': 0}, u'SubscriptionArn': 'pending

How to limit the consuming rate from a topic?

♀尐吖头ヾ 提交于 2020-01-14 08:09:03
问题 Has anyone else solved the following problem? I have SNS topic filled with events from S3 and there is Lambda function which is subscribed on this topic and when thousand of events are put to this topic, lambda function is throttled because of exceeding the limit of concurrency. I don't want to request a limit increase for concurrent executions but I would decrease concurrent consuming from the topic, but I didn't find information how to do it. Thanks. 回答1: A couple of options regarding SNS:

How to limit the consuming rate from a topic?

北慕城南 提交于 2020-01-14 08:08:30
问题 Has anyone else solved the following problem? I have SNS topic filled with events from S3 and there is Lambda function which is subscribed on this topic and when thousand of events are put to this topic, lambda function is throttled because of exceeding the limit of concurrency. I don't want to request a limit increase for concurrent executions but I would decrease concurrent consuming from the topic, but I didn't find information how to do it. Thanks. 回答1: A couple of options regarding SNS:

Invoke Lambda using SNS from Outside Account

丶灬走出姿态 提交于 2020-01-14 08:00:10
问题 I've been following the following blog post from Amazon (Scenario 3: Triggering a Lambda function from an Amazon S3 bucket notification in another account) about authorizing Lambda functions for various uses. I would like to setup a Lambda function to accept SNS messages from external accounts (external to the acct with the lambda function). https://aws.amazon.com/blogs/compute/easy-authorization-of-aws-lambda-functions/ I was expecting to add the permission to invoke the function remotely as

Can you publish a message to an SNS topic using an AWS Lambda function backed by node.js?

我只是一个虾纸丫 提交于 2020-01-09 04:14:17
问题 Can you publish a message to an SNS topic using an AWS Lambda function backed by node.js? 回答1: Yes, you could write a Lambda function that publishes to an SNS topic. The code running in Lambda has access to the full AWS SDK for Java or Javascript, whichever your function is using. You just need to make sure you give the IAM role executing the function access to publish to your topic. In Javascript: console.log("Loading function"); var AWS = require("aws-sdk"); exports.handler = function(event

SNSPublishRequest how to send the aps array and not see the “default” message for APNS

Deadly 提交于 2020-01-05 12:09:17
问题 I am trying to publish to SNS using the SNSPublishRequest but I can't figure out how to format the JSON to actually use the parameters set for the aps dictionary. If I put in something for the "default" it will send that message. But if I add the APNS dictionary as well, it seems to not show anything. This is how I am formatting the JSON request - am I missing something? NSDictionary *parameters = @{@"default" : @"", @"APNS" : @{@"aps": @{@"alert": @"hello"}}}; NSError *error; NSData

SNSPublishRequest how to send the aps array and not see the “default” message for APNS

南笙酒味 提交于 2020-01-05 12:08:41
问题 I am trying to publish to SNS using the SNSPublishRequest but I can't figure out how to format the JSON to actually use the parameters set for the aps dictionary. If I put in something for the "default" it will send that message. But if I add the APNS dictionary as well, it seems to not show anything. This is how I am formatting the JSON request - am I missing something? NSDictionary *parameters = @{@"default" : @"", @"APNS" : @{@"aps": @{@"alert": @"hello"}}}; NSError *error; NSData

Send Push Notifications using Amazon SNS service

点点圈 提交于 2020-01-05 03:10:29
问题 we are developing a mobile application which sends push notifications and we would like to do it using Amazon SNS service and I would like to confirm the general idea of how we are planning to manage devices registration and push notifications sending. As far as I understood: In Amazon SNS there is the concept of PlatformApplication where we specify if it's Android/iPhone et also the environment (Test/Prod,...) Then, there is the concept of PlatformEndPoint "for a device and mobile app" so, I

Send Push Notifications using Amazon SNS service

蓝咒 提交于 2020-01-05 03:10:14
问题 we are developing a mobile application which sends push notifications and we would like to do it using Amazon SNS service and I would like to confirm the general idea of how we are planning to manage devices registration and push notifications sending. As far as I understood: In Amazon SNS there is the concept of PlatformApplication where we specify if it's Android/iPhone et also the environment (Test/Prod,...) Then, there is the concept of PlatformEndPoint "for a device and mobile app" so, I