Search code examples
amazon-web-servicesamazon-sns

How do I get the latest message in an SNS Topic?


Using AWS CLI, how do I get the latest message in an SNS topic?

Specifically I would like to view this SNS topic, which is used by AWS to inform users of changes to IP ranges of their services:

arn:aws:sns:us-east-1:806199016981:AmazonIpSpaceChanged

Solution

  • SNS does not support that. You can subscribe to a topic and get all future notifications pushed to you. There is no support for querying historical messages.