Return value from SQS that triggers lambda function using aws java sdk

This is not possible because the that sends a message to Amazon SQS completes once the message is sent. This allows the queue to be used to decouple services. In fact, a message could sit in an SQS queue for up to 14 days.

While the SQS queue will trigger the AWS Lambda function very quickly, there is still no concept of a "return" value from the Lambda function if it is triggered from an SQS message.

If you wish to trigger Lambda and wait for a response, you can directly invoke the Lambda function and await a response. This would not involve the use of SQS.