[ANN] aws-sdk-extended first release (0.0.1)
aws-sdk-extended 0.0.1 has been released.
The Amazon SQS Extended Client allows clients to manage Amazon SNS and SQS message payloads that exceed the 256 KB message size limit, up to a size of 2 GB. In the event of publishing such large messages, the client accomplishes this feat by storing the actual payload in a S3 bucket and by storing the reference of the stored object in the SQS queue. Similarly, the extended-client is also used for retrieving and dereferencing these references of message objects stored in S3. Thus, the library is used for the following purposes:
- Specify whether payloads are always stored in Amazon S3 or only when a payload’s size exceeds 256 KB.
- Send a message that references a single message object stored in an Amazon S3 bucket.
- Get the corresponding payload object from an Amazon S3 bucket.
- Delete the corresponding payload object from an Amazon S3 bucket.
# for SNS
require "aws-sdk-sns"
require "aws/sdk/extended"
sns = Aws::SNS::Client.new
ext_sns = Aws::SNS::ExtendedClient.new(sns)
large_message = "fwijeofejow...." #=> over 256kb string
sns.publish(topic_arn: "TOPIC_ARN", message: large_message) #=> raise error
ext_sns.publish(topic_arn: "TOPIC_ARN", message: large_message) #=> works
Post a comment