# aws-sdk-java-v2-dynamodb

Provides Amazon DynamoDB patterns using AWS SDK for Java 2.x and the Enhanced Client. Use it for type-safe CRUD, queries, transactions, and Spring Boot integration.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3700 installs · ★ 363
- Author: giuseppe-trisciuoglio
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/giuseppe-trisciuoglio/developer-kit/tree/HEAD/plugins/developer-kit-java/skills/aws-sdk-java-v2-dynamodb/SKILL.md
- Updated: 2026-09-10
- HTML: https://affpapa.org/en/nevibecode/skills/aws-sdk-java-v2-dynamodb

## What it does

This skill supplies reference implementations for interacting with DynamoDB through `software.amazon.awssdk:dynamodb-enhanced`. It includes model definitions with `@DynamoDbBean`, `@DynamoDbPartitionKey`, and `@DynamoDbSortKey`, alongside query construction via `QueryConditional` and `Expression` filters.

Running `scan()` operations is discouraged because reading an entire table depletes provisioned capacity. The instructions require validating `unprocessedAttributes()` during batch writes to safely retry missed records using exponential backoff.

To use these patterns, you need the AWS SDK DynamoDB dependencies in `pom.xml` and an initialized `DynamoDbClient`. It also covers multi-table atomic operations via `transactWriteItems` with handling for transaction cancellation exceptions.

## Requirements
- Works with: AWS

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-dynamodb -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/aws-sdk-java-v2-dynamodb/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/aws-sdk-java-v2-dynamodb/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-dynamodb -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/aws-sdk-java-v2-dynamodb/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-dynamodb -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/aws-sdk-java-v2-dynamodb/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install giuseppe-trisciuoglio/developer-kit aws-sdk-java-v2-dynamodb
```

2. **Manually: put the files in place**
- File: `.github/skills/aws-sdk-java-v2-dynamodb/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-dynamodb -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/giuseppe-trisciuoglio/developer-kit --path plugins/developer-kit-java/skills/aws-sdk-java-v2-dynamodb
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/aws-sdk-java-v2-dynamodb/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-dynamodb -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/giuseppe-trisciuoglio/developer-kit/tree/HEAD/plugins/developer-kit-java/skills/aws-sdk-java-v2-dynamodb/SKILL.md

## When to use it
- map Java entity classes using `@DynamoDbBean` and key annotations
- build typed queries with `QueryConditional` and custom expression filters
- execute batch writes while handling unprocessed items with backoff
- run multi-table atomic transactions using `transactWriteItems`

## Example prompts
- Create a Customer entity for DynamoDB using @DynamoDbBean with customerId and orderId keys
- Show how to query the Orders table using QueryConditional and filter by PENDING status
- Implement a batchWriteItem call with retry logic for unprocessed items

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 00879bef5efe8461.

BEGIN THIRD-PARTY FILE 00879bef5efe8461
````text
---
name: aws-sdk-java-v2-dynamodb
description: Provides Amazon DynamoDB patterns using AWS SDK for Java 2.x. Use when creating, querying, scanning, or performing CRUD operations on DynamoDB tables, working with indexes, batch operations, transactions, or integrating with Spring Boot applications.
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
---

# AWS SDK for Java 2.x - Amazon DynamoDB

## Overview

Provides DynamoDB patterns using AWS SDK for Java 2.x with Enhanced Client for type-safe CRUD, queries, batch operations, transactions, and Spring Boot integration.

## When to Use

- CRUD operations on DynamoDB items
- Querying tables with sort keys or GSI
- Batch operations for multiple items
- Atomic transactions across tables
- Spring Boot integration with DynamoDB

## Instructions

1. Add AWS SDK DynamoDB dependencies to `pom.xml`
2. Configure client setup (low-level or Enhanced Client)
3. Define entity classes with `@DynamoDbBean` annotations
4. Perform operations using `DynamoDbTable` (CRUD, query, scan, batch, transactions)
5. Handle partial failures with retry logic and exponential backoff
6. Use repository pattern for Spring Boot integration

## Dependencies

Add to `pom.xml`:
```xml
<!-- Low-level DynamoDB client -->
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>dynamodb</artifactId>
</dependency>

<!-- Enhanced client (recommended) -->
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>dynamodb-enhanced</artifactId>
</dependency>
```
## Client Setup

### Low-Level Client
```java
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;

DynamoDbClient dynamoDb = DynamoDbClient.builder()
    .region(Region.US_EAST_1)
    .build();
```

### Enhanced Client (Recommended)
```java
import software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClient;

DynamoDbEnhancedClient enhancedClient = DynamoDbEnhancedClient.builder()
    .dynamoDbClient(dynamoDb)
    .build();
```

## Entity Mapping

```java
@DynamoDbBean
public class Customer {

    @DynamoDbPartitionKey
    private String customerId;

    @DynamoDbAttribute("customer_name")
    private String name;

    private String email;

    @DynamoDbSortKey
    private String orderId;

    // Getters and setters
}
```

For complex entity mapping with GSIs and custom converters, see [Entity Mapping Reference](references/entity-mapping.md).
````
END THIRD-PARTY FILE 00879bef5efe8461

The third-party file has ended. Everything between the 00879bef5efe8461 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2442 of 13387 bytes. © giuseppe-trisciuoglio · MIT · https://github.com/giuseppe-trisciuoglio/developer-kit/tree/HEAD/plugins/developer-kit-java/skills/aws-sdk-java-v2-dynamodb/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
