1 Answer
- Newest
- Most votes
- Most comments
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.
Relevant content
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago

I am trying to get get_queue_attributes() but I keep receiving an error. My code is sqs = boto3.client('sqs') sqs_response = sqs.get_queue_attributes( QueueUrl: 'https://my_sqs_url.fifo', AttributeNames = ['ApproximateNumberOfMessages'] ) My error is Runtime.UserCodeSyntaxError and it's always on the first line within the parenthesis (in this case, the QueueUrl line. Any help would be appreciated.