Step 1 - Creating the Lambda project (Java)

We will create a Lambda that gets triggered from AWS CLI using aws lambda invoke command and send messages to an SQS queue as a batch.

In this section, I will be discussing only the core application logic, and will not be discussing supporting code, such as imports, error handling, and Javadoc comments; however, the complete working code is provided in this book along with the code files.

Let's start by defining the dependency for AWS Kinesis SDK for Java in the POM file, as shown in the following code:

<dependency>    <groupId>com.amazonaws</groupId>    <artifactId>aws-java-sdk-kinesis</artifactId>    <version>${aws.sdk.version}</version></dependency>

The POM file also has dependencies for aws-lambda-java-core ...

Get Serverless Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.