In this recipe, we will create a Lambda function in Java to receive messages from an existing input SQS queue and send all the messages as a batch to another SQS output queue. We will also delete the messages from the input SQS queue.
Receiving and sending SQS messages in batches with SDK (Java)
Getting ready
You need to follow the section Getting started in the recipes Your first AWS Lambda and Your first Lambda with AWS CLI from Chapter 1, Getting Started with Serverless Computing on AWS to set up Java, Maven, the parent project, serverless-cookbook-parent-aws-java and AWS CLI, and may also read other notes there including code usage guidelines, S3 bucket creation and notes for the Windows users.