We are excited to announce that the https://github.com/aws/aws-sdk-java-v2 now offers the Enhanced Document API for DynamoDB, providing an enhanced way of working with https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html. This post covers using the Enhanced Document API for DynamoDB with the https://aws.amazon.com/blogs/developer/introducing-enhanced-dynamodb-client-in-the-aws-sdk-for-java-v2/. By using the Enhanced Document API, you can create an https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/enhanced/dynamodb/document/EnhancedDocument.html instance to represent an item with no fixed schema, and then use the DynamoDB Enhanced Client to read and write to DynamoDB. Furthermore, unlike the Document APIs of aws-sdk-java x, which provided arguments and return types that were not type-safe, the EnhancedDocument provides strongly-typed APIs for working with documents.
To execute commands against a DynamoDB table using the Enhanced Document API, you must associate the table with your Document table schema to create a DynamoDbTable resource object.