awslabs / amazon-sqs-java-extended-client-lib

An extension to the Amazon SQS client that enables sending and receiving messages up to 2GB via Amazon S3.
Apache License 2.0
211 stars 109 forks source link

Cannot process an SQS message sent from extended client in a lambda triggered from SQS #76

Closed arshadm closed 2 years ago

arshadm commented 2 years ago

If an extended client was used to send a message to SNS, and then an SQS queue is used to trigger a lambda on receipt then it's not possible to use the extended client functionality to get the original message (i.e. download the payload).

The code that actually handles an incoming message should be a public function that can be used in other environments where we have an SQS message already which we need to get the full payload.

msailes commented 2 years ago

Hi @arshadm,

The Lambda Powertools project has this functionality.

https://awslabs.github.io/aws-lambda-powertools-java/utilities/sqs_large_message_handling/

Thanks Mark

arshadm commented 2 years ago

@msailes Thanks, that solves my problem in a more elegant way.