SQS: How can I read the sent time of an SQS message using the Python boto library

I see that messages have sent time when I view them in the SQS message view in the AWS console. How can I read this data using the boto python library?

+7
source share
2 answers

When you read a message from a queue in boto, you get a Message object. This object has an attributes . This is an attribute dictionary that SQS supports this message. It includes SentTimestamp .

+3
source

You can use the attribute parameter of the get_message () method. See the documentation.

 queue.get_messages(attributes=['All']) 

The documentation also says that you can do this with the read () method, but now this is broken. I discovered a problem for this on the project website: https://github.com/boto/boto/issues/2699 .

+2
source

All Articles