In previous recipes, we saw how to work with tables and data in DynamoDB using CloudFormation and the AWS CLI. In this recipe, I will outline the general steps to use the AWS Java SDK for DynamoDB from Lambda, and there will be no code files. In later recipes, we will implement different DynamoDB operations in Lambda, following this outline.
We will create different Lambda for different DynamoDB operations such as create table, add item, and read item. When used with API gateway, each Lambda will be mapped to a particular HTTP method on a resource. You may also use the same Lambda for all operations using Lambda proxy integration.