How get message Visibility Timeout value in Lambda?

0

Hi! How can I get a message VisibilityTimeout value in Lambda (Node.js script) triggered by SQS? I need to change this value for staying the message in Queue for a longer period for next processing. Or how can I get the VisibilityTimeout value of the Queue itself programmatically? P.S. I'm deploying the stack via serverless-framework.

Oleksa
asked 2 years ago662 views
1 Answer
1
Accepted Answer

Usually you can get the message visibility timeout when you make a call to get_messages, however, when invoked with Lambda, the Lambda service makes the call to get_messages, and it seems it does not ask for this attribute.

You could make a call to get_queue_attributes to the get the defines visibility timeout on the queue, but remember that you can override this value for individual messages when your message producer sends the messages to the queue.

profile pictureAWS
EXPERT
Uri
answered 2 years ago
profile picture
EXPERT
reviewed 19 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions