How to do it...

Let's discuss the steps to read data from Lambda without repeating the common steps we already discussed:

  1. Create a Maven project for the Lambda with the common parent and the DynamoDB Java SDK dependency.
  2. Define the Request and Response domain objects.

The Request object for the lambda-dynamodb-read-item lambda is defined as follows:

@Datapublic class Request {    private String tableName;    private String partitionKey;    private String sortKey;    private String partitionKeyValue;    private String sortKeyValue; // Will be stored integer.    private boolean waitForActive;    private Map<String, String> filterData;}

The filterData map will contain the attributes to create filter expressions and their corresponding values. The Response object ...

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.