amazon-sqs

Lambda trigger doesn't replicate to SQS source across accounts

浪尽此生 提交于 2021-01-29 06:12:39
问题 I'm trying to add an SQS as a source/trigger to a lambda. I can do this just fine if both components reside within the same account. When I add the trigger to the lambda, the lambda trigger configuration replicates over to the SQS queue to pair the two. When I try this same thing on my lambda when the SQS is remote in a different account the Lambda trigger is established, but when viewing the remote SQS it doesn't show a trigger configured. This seems to result in the trigger not working on

Apache Camel not acquiring message from SQS in timely manner

元气小坏坏 提交于 2021-01-29 04:54:55
问题 We have an implementation where messages are being placed on an AWS SQS queue and being consumed by Camel AWS. We are using concurrentConsumers = 1. We are logging the polling of the queue as done by org.apache.camel.component.aws.sqs.SqsConsumer . The test consists of sending a message to SQS (from a remote system) and then logging the time the message is on the queue. On the Camel end, we have trace logging on the SqsConsumer class, and we can see when the queue is polled, and when messages

Lambda : Send a message to SQS

大憨熊 提交于 2021-01-28 06:44:36
问题 I tried to upgrade one of my lambda but can't make it work... so I have a lambda to manage my stripe payment, everything work fine. I want to send a message to SQS when a payment is OK. You can see my lambda function below : const stripe = require('stripe')("sk_test_xXxXxXxXxX"); const ApiBuilder = require('claudia-api-builder'); const querystring = require('querystring'); var api = new ApiBuilder(); var AWS = require('aws-sdk'); var sqs = new AWS.SQS({region : 'eu-west-1'}); var queueUrl =

DynamoDB not receiving the entire SQS message body

£可爱£侵袭症+ 提交于 2021-01-28 05:43:44
问题 I am pulling data from an API in batches and sending it to an SQS Queue. Where I am having an issue is processing the message in order to send the data to DynamoDB. There is supposed to be 147,689 records in the dataset. However, when running the code, sometimes less than 147,689 records will be put to DynamoDB, sometimes more than 147,689 records will be put to DynamoDB, and sometimes 147,689 records will be put to DynamoDB. It is not consistently putting 147,689 records into the database. I

Aws Sqs Consumer - Poll only when messages can be processed immediately

假装没事ソ 提交于 2021-01-27 18:19:53
问题 I'm trying to create an AWS SQS windows service consumer that will poll messages in batch of 10. Each messages will be executed in its own task for parallel execution. Message processing includes calling different api's and sending email so it might take some time. My problem is that first, I only want to poll the queue when 10 messages can be processed immediately. This is due to sqs visibility timeout and having the received messages "wait" might go over the visibility timeout and be "back"

SQS Timeout from Lambda within VPC

会有一股神秘感。 提交于 2021-01-27 12:52:34
问题 I have a Lambda that needs to be on a VPC to talk to protected resources like RDS and AWSDocumentDB. It also needs to be able to see the outside world for some calls to 3rd party APIs. To do this I used the VPC wizard to create a VPC that had both public and private subnets. The wizard also created and attached an Internet Gateway. After this I attached my Lambda, RDS instance and DocumentDb cluster to the VPC. Since then, however I have been unable to talk to my SQS queues from within my

AWS Lambda Triggered by SQS increases SQS request count

陌路散爱 提交于 2021-01-27 10:24:25
问题 I have a AWS Lambda function which is triggered by SQS. This function is triggered approximately 100 times daily, but request count to the SQS queue is approximately 20.000 times daily. I don't understand why the number of requests made to the SQS is too high. My expectation is that the number of requests made to the SQS should be same with the Lambda invocation. I have only one Lambda function and one SQS queue in my account. Can be related with polling of SQS queue? I tried to change the

AWS Lambda Triggered by SQS increases SQS request count

不问归期 提交于 2021-01-27 10:23:17
问题 I have a AWS Lambda function which is triggered by SQS. This function is triggered approximately 100 times daily, but request count to the SQS queue is approximately 20.000 times daily. I don't understand why the number of requests made to the SQS is too high. My expectation is that the number of requests made to the SQS should be same with the Lambda invocation. I have only one Lambda function and one SQS queue in my account. Can be related with polling of SQS queue? I tried to change the

how to implement exponential backoff in amazon sqs without writing code

喜欢而已 提交于 2021-01-27 07:19:12
问题 I have a simple task that requires a 3rd party. When a request comes, I push it to an amazon sqs queue, pull it in a worker and call the 3rd party . In case of a time out, I want to implement an exponential backoff (try again in 2 secs, then 4 then 8, then...) with a max retry. Using python , boto -> sqs I've looked for built in parameters to allow me to do so with as little code as possible ( ideally, no code at all ). Something like from boto import sqs def handle_message(message): try: #

AWS Lambda not removing messages from the queue

故事扮演 提交于 2021-01-23 15:21:02
问题 I am triggering a Lambda function from an SQS event with the following code: @Override public Void handleRequest(SQSEvent sqsEvent, Context context) { for (SQSMessage sqsMessage : sqsEvent.getRecords()) { final String body = sqsMessage.getBody(); try { //do stuff here } catch (Exception ex) { //send to DLQ } } return null; } The "do stuff" is calling another Lambda function with the following code: private final AWSLambda client; private final String functionName; public LambdaService