Lambda stuck on sending messages to SQS or upload files to S3 from time to time with no reason.

0

For some reason from time to time during last 2 weeks, while i was developing serverless solution, lambda become stuck on using aws-sdk v2 and aws-sdk v3.

It runы code before the moment it needs to send SQS message or upload json file to S3 and then stuck. When I used aws-sdk v2, I added a logger to it for debugging, during normal invocation it showed me that it sent it well (and some results), but when it stuck it doesnt return anything.

I tried to change lambda timeout to 6sec,10sec, 60 sec. It just run out of time without any errors. Once I redeploy it, it can start working again. (but in some cases it's not).

I also tried to create client outside of the handler, inside the handler. When I consoled log the client, I could see that it has an object.

Syntaxis:

in aws-sdk v2 I used

const sqs = new AWS.SQS({apiVersion: '2012-11-05'});
sqs.sendMessage(params).promise 

in aws-sdk v3 i use

sqsClient.send(
        new SendMessageCommand({ ...param })
      );

Can it be related to bad ENI or something ? Does anyone have any ideas on what can be the reason of that behaviour

  • runtime: nodejs16.x.
  • architecture: arm64
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen