Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

271
Visualizações
Aws lambda retry behavior when triggered by cloudwatch event

I have created a lambda function which is triggered through cloudwatch event cron. While testing I found that lambda retry is not working in case of timeout. I want to understand what is the expected behaviour.Should retry happen in case of timeout?

P.S I have gone through the document on the aws site but still can't figure out https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Found the aws documentation on this,

"Error handling for a given event source depends on how Lambda is invoked. Amazon CloudWatch Events is configured to invoke a Lambda function asynchronously."

"Asynchronous invocation – Asynchronous events are queued before being used to invoke the Lambda function. If AWS Lambda is unable to fully process the event, it will automatically retry the invocation twice, with delays between retries."

So the retry should happen in this case. Not sure what was wrong with my lambda function , I just deleted and created again and retry worked this time.

over 4 years ago · Santiago Trujillo Relatório

0

Judging from the docs you linked to it seems that the lambda function is called again if it has timed out and the timeout is because it is waiting for another resource (i.e. is blocked by network):

The function times out while trying to reach an endpoint.

As a cron event is not stream based (if it is synchronous or asynchronous seems not be be clear from the docs) it will be retried.

over 4 years ago · Santiago Trujillo Relatório

0

CloudWatch Event invokes a Lambda function asynchronously.

For asynchronous invocation, Lambda manages the function's asynchronous event queue and attempts to retry two more times on errors including timeout. https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html

So with the default configuration, your function should retry with timeout errors. If it doesn't, there might be some other reasons as follows:

  1. The function doesn't have enough concurrency to run and events are throttled. Check function's reserved concurrency setting. It should be at least 1.
  2. When above happens, events might also be deleted from the queue without being sent to the function. Check function's asynchronous invocation setting, make sure it has enough age to keep the events in the queue and retry attempts is not zero.
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda