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
已提問 2 年前檢視次數 676 次
1 個回答
1
已接受的答案

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
專家
Uri
已回答 2 年前
profile picture
專家
已審閱 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南