QuiNovas / sqs-extended-client

AWS SQS extended client functionality from amazon-sqs-java-extended-client-lib
Apache License 2.0
13 stars 11 forks source link

automatically retrieving the SQS message content from s3 while using lambda trigger from the event dict #13

Closed DevBey closed 12 months ago

DevBey commented 2 years ago

Hi,

this seems to work fine when you are explicitly receiving the message, but when we put a automatic trigger from SQS to lambda, then in that case the message is already inside the event variable of the lambda handler which contains the s3 location of the message not the actually message.

in sqs java library using https://awslabs.github.io/aws-lambda-powertools-java/utilities/sqs_large_message_handling/ we can overide and automatically process the event variable and retrieve the message from the s3.

how can we do the same thing here, do we have the same functionality.

the workaround that I see is we can manually retrieve the message from s3 using boto s3 clinet using the s3 bucket and key.

joseph-wortmann commented 2 years ago

Yes, it was originally designed to receive directly from the queue.

If you want to receive as a trigger, you can use some of the internal message processing functionality to convert the event to "jms" messages.