With localstack/localstack#6603, the (incorrect) attribute "sqs" was removed from the event layout.
However, it seems this broke the javalibs, as they assumed that attribute to be present for the detection of a sqs event.
This PR will correct the incorrect assumption on the java util side, to allow SQSEvents to be properly created again.
Addresses localstack/localstack#6995 .
This only affects the local provider, but I fixed it regardless as it is a regression.
The whole logic isn't valid, we should inspect the lambda handler and check its type to use it, but implementing that (which is already implemented in the lambda java ric anyway) seems unnecessary if the local executor is deprecated anyway.
Changes
Use the (acutally present, also in AWS) eventSource attribute of a record to check if it is an sqs event, instead of the incorrect sqs key.
Motivation
With localstack/localstack#6603, the (incorrect) attribute "sqs" was removed from the event layout. However, it seems this broke the javalibs, as they assumed that attribute to be present for the detection of a sqs event.
This PR will correct the incorrect assumption on the java util side, to allow SQSEvents to be properly created again.
Addresses localstack/localstack#6995 . This only affects the local provider, but I fixed it regardless as it is a regression.
The whole logic isn't valid, we should inspect the lambda handler and check its type to use it, but implementing that (which is already implemented in the lambda java ric anyway) seems unnecessary if the local executor is deprecated anyway.
Changes
eventSource
attribute of a record to check if it is an sqs event, instead of the incorrect sqs key.