- Home
- Skills
- Giuseppe Trisciuoglio
- Developer Kit
- Aws Sdk Java V2 Dynamodb
aws-sdk-java-v2-dynamodb_skill
- Python
99
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-dynamodb- SKILL.md14.5 KB
Overview
This skill provides practical patterns and ready-to-use code for working with Amazon DynamoDB using the AWS SDK for Java 2.x. It emphasizes the DynamoDB Enhanced Client for type-safe entity mapping, and includes examples for CRUD, queries, scans, batch operations, transactions, and Spring Boot integration. Use it to accelerate reliable DynamoDB access in Java applications.
How this skill works
The skill shows how to configure both the low-level DynamoDbClient and the DynamoDbEnhancedClient, annotate Java beans with @DynamoDbBean, and create DynamoDbTable instances mapped to your domain classes. It provides concrete code for put/get/update/delete operations, QueryConditional and Expression-based filters, batchGet/batchWrite flows, transactRead/transactWrite examples, and Spring Boot bean configuration and repositories. Testing patterns for unit and integration tests with Mockito and LocalStack are included.
When to use it
- Creating, updating, or deleting DynamoDB tables and items
- Implementing type-safe CRUD using the Enhanced Client and @DynamoDbBean
- Running queries or scans with filter expressions and pagination
- Executing batch operations or transactional reads/writes
- Integrating DynamoDB into Spring Boot repositories and services
Best practices
- Prefer the DynamoDB Enhanced Client to reduce boilerplate and enable TableSchema mapping
- Design partition and sort keys to distribute load and support access patterns
- Use GSIs sparingly and only for necessary alternate queries
- Favor queries over scans; implement pagination for large result sets
- Use batch operations and exponential backoff to reduce API calls and handle throttling
- Apply conditional writes and transactions for atomicity when required
Example use cases
- A Spring Boot CustomerRepository that saves, finds, and deletes Customer records via DynamoDbEnhancedClient
- Batch importing or exporting hundreds of items using batchWriteItem and batchGetItem
- A transactional 'placeOrder' operation that writes an Order and updates a Customer atomically
- Filtering scans to find VIP customers by points or status using Expression filters
- Unit and integration tests using Mockito for clients and LocalStack for end-to-end verification
FAQ
Yes for most application-level use cases: it provides type-safe mapping, TableSchema support, and less boilerplate. Use the low-level client only for features not yet supported by the Enhanced Client.
How do I test DynamoDB interactions locally?
Use LocalStack or DynamoDB Local for integration tests and Mockito to mock DynamoDbClient and DynamoDbEnhancedClient for unit tests.