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

208
Visualizações
How to prevent AWS Lambda from deleting message from SQS queue

I have a Lambda function, which will be sending SNS notification when a message is sent to SQS Queue. But i observe that Lambda will delete the message from queue once it has processed it and its been mentioned here

Is there a way i can make the lambda fail, without actually throwing a new Exception in java.

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

0

From you description, it seems that you should consider using fan-out scenario for your use-case:

The "fanout" scenario is when an Amazon SNS message is sent to a topic and then replicated and pushed to multiple Amazon SQS queues, HTTP endpoints, or email addresses.

enter image description here

In this scenario, your SNS would publish a message to two SQS queues. Subsequently, each team would have its own messages to work, and you wouldn't need to forcefully terminate your lambda to keep a processed message in a single queue.

over 4 years ago · Santiago Trujillo Relatório

0

By default, SQS to Lambda integration means that messages in que will become invisible once the function begins processing it, and will be deleted from the que once the function has completed.

If the function fails (bad exit), then the message will go back to 'visible', and will be processed once again by a new lambda invocation. This will go-on until whatever is configured in your re-drive policy.

In any case, after about 4 days, messages will start to be purged off the que, the SQS que is not a permanent storage place. You cannot use SQS as permanent storage.

A short answer to your question is to fail the invocation by exiting with a non-zero status -- but beware, the message will be reprocessed, unless you have a redrive policy that will push it into the DLQ.

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