Posted On: Aug 26, 2020
Amazon Simple Notification Service (SNS) now has launched an open-source Extended Client Library for Java that enables you to publish and deliver messages with payloads up to 2GB. Previously, message payloads were supported up to 256KB. Using the Extended Client Library, you can store the message payloads larger than 256KB in an S3 bucket and use SNS to publish and deliver a reference to the payload location.
Large payload transmissions are billed as one SNS request and one S3 request, with billing for the payload based on the amount of data stored in S3. If you need to deliver messages with large payload from Amazon SNS to Amazon SQS, you can use the existing SQS Extended Client Library, which automates the retrieval of the payload from S3.
Both the SNS and SQS Extended Client Libraries rely on the AWS payload offloading library to store and retrieve message payloads in S3. This shared library can be used on its own by other Java-based protocol endpoints, such as Lambda, HTTP and HTTPS endpoints, to retrieve message payloads from S3. Non-Java endpoints can utilize their native AWS SDKs to retrieve the content from S3 using the content URL embedded in the delivered message.
To learn more about Amazons SNS, visit the SNS homepage or documentation. To get started with the new SNS Extended Client Library and begin publishing larger message payloads, simply download the new library from AWS Labs on GitHub.