Skip to main content
skill CX Codex

aws-sdk-java-v2-rds — Claude Code skill: what it does, how to install

Guides AI agents in managing Amazon RDS databases via the AWS SDK for Java 2.x. Useful for provisioning instances, snapshots, and parameter groups.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-rds -a claude-code
Open on GitHub

What aws-sdk-java-v2-rds does

This skill provides patterns for interacting with RdsClient using AWS SDK for Java 2.x. It helps the AI agent write valid Java code to provision database instances, turn on storage encryption, configure VPC security groups, and set backup retention windows.

Code patterns rely on SDK waiters such as waitUntilDBInstanceAvailable. The client waits until the database instance reaches the available status before moving forward. This prevents downstream scripts from crashing on an unready database. Using these patterns requires adding the AWS RDS SDK dependency and matching database drivers to the Java build.

It also outlines database maintenance workflows. These include parameter group management, manual snapshot triggers, and instance deletion with mandatory final snapshots.

What it helps with

  • instantiate an RdsClient with custom timeouts and credential providers
  • provision a secure PostgreSQL RDS instance with Multi-AZ deployment
  • block execution until the newly created database reaches available status
  • trigger manual RDS snapshots prior to major updates
  • safely delete an RDS instance while preserving a final database snapshot

Example prompts for the agent

  • Write a Java method using AWS SDK v2 to create an RDS PostgreSQL instance with Multi-AZ and wait until it is available.
  • Show how to safely delete an Amazon RDS database with a final snapshot using RdsClient.
  • Configure an RdsClient bean with ApacheHttpClient custom connection and socket timeouts.

How to install aws-sdk-java-v2-rds

1Skills CLI (Vercel)

npx skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-rds -a claude-code

2Manually: put the files in place

~/.claude/skills/aws-sdk-java-v2-rds/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/aws-sdk-java-v2-rds/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about aws-sdk-java-v2-rds

How to install aws-sdk-java-v2-rds in Claude Code?

Run npx skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-rds -a claude-code in your project terminal.

What does aws-sdk-java-v2-rds do?

It gives your agent verified patterns for Amazon RDS using the AWS SDK for Java 2.x. It covers instance provisioning, snapshot management, and status monitoring via waiters.

What dependencies are required to run the generated RDS code?

Your project must include the AWS SDK for Java v2 RDS client dependency (software.amazon.awssdk:rds) alongside the relevant database JDBC driver.

Source text

SKILL.md · MIT
---
name: aws-sdk-java-v2-rds
description: Provides AWS RDS (Relational Database Service) management patterns using AWS SDK for Java 2.x. Use when creating, modifying, monitoring, or managing Amazon RDS database instances, snapshots, parameter groups, and configurations.
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
---

# AWS SDK for Java v2 - RDS Management

## Overview

This skill provides comprehensive guidance for working with Amazon RDS (Relational Database Service) using the AWS SDK for Java 2.x, covering database instance management, snapshots, parameter groups, and RDS operations.

## When to Use

- Creating, modifying, or deleting RDS database instances
- Managing DB snapshots, parameter groups, and configurations
- Setting up Multi-AZ deployments and automated backups
- Connecting Lambda functions to RDS databases
- Monitoring instance status and performance

## Instructions

Follow these steps to work with Amazon RDS:

1. **Add Dependencies** - Include AWS RDS SDK dependency and database drivers
2. **Create RDS Client** - Instantiate RdsClient with proper region and credentials
3. **Create DB Instance** - Use createDBInstance() with appropriate configuration
4. **Configure Security** - Set up VPC security groups and encryption
5. **Set Up Backups** - Configure automated backup windows and retention
6. **Monitor Status** - Use describeDBInstances() to check instance state
7. **Create Snapshots** - Take manual snapshots before major changes
8. **Handle Failover** - Configure Multi-AZ for high availability

## Getting Started

### RDS Client Setup

The `RdsClient` is the main entry point for interacting with Amazon RDS.

**Basic Client Creation:**
```java
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.rds.RdsClient;

RdsClient rdsClient = RdsClient.builder()
    .region(Region.US_EAST_1)
    .build();

// Use client
describeInstances(rdsClient);

// Always close the client
rdsClient.close();
```

**Client with Custom Configuration:**
```java
import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;
import software.amazon.awssdk.http.apache.ApacheHttpClient;

RdsClient rdsClient = RdsClient.builder()
    .region(Region.US_WEST_2)
    .credentialsProvider(ProfileCredentialsProvider.create("myprofile"))
    .httpClient(ApacheHttpClient.builder()
        .connectionTimeout(Duration.ofSeconds(30))
        .socketTimeout(Duration.ofSeconds(60))
        .build())
    .build();
```

### Describing DB Instances

```java
DescribeDbInstancesResponse response = rdsClient.describeDBInstances();
for (DBInstance instance : response.dbInstances()) {
    System.out.println(instance.dbInstanceArn() + " - " + instance.dbInstanceStatus());
}
```

## Key Operations

### Creating DB Instances

```java
CreateDbInstanceRequest request = CreateDbInstanceRequest.builder()
    .dbInstanceIdentifier(dbInstanceIdentifier)
    .dbName(dbName)
    .engine("postgres")
    .engineVersion("15.4")
    .dbInstanceClass("db.t3.micro")
    .allocatedStorage(20)
    .masterUsername(masterUsername)
    .masterUserPassword(masterPassword)
    .publiclyAccessible(false)
    .build();

CreateDbInstanceResponse response = rdsClient.createDBInstance(request);

// VALIDATION CHECKPOINT: Wait for instance to be available
rdsClient.waiter().waitUntilDBInstanceAvailable(
    DescribeDbInstancesRequest.builder().dbInstanceIdentifier(dbInstanceIdentifier).build()
);
System.out.println("Instance " + dbInstanceIdentifier + " is available!");
```

### Managing DB Parameter Groups

```java
CreateDbParameterGroupRequest request = CreateDbParameterGroupRequest.builder()
    .dbParameterGroupName(groupName)
    .dbParameterGroupFamily("postgres15")
    .description(description)
    .build();
rdsClient.createDBParameterGroup(request);
```

### Managing DB Snapshots

```java
CreateDbSnapshotRequest request = CreateDbSnapshotRequest.builder()
    .dbInstanceIdentifier(dbInstanceIdentifier)
    .dbSnapshotIdentifier(snapshotIdentifier)
    .build();
CreateDbSnapshotResponse response = rdsClient.createDBSnapshot(request);
```

## Integration Patterns

### Spring Boot Integration

Refer to [references/spring-boot-integration.md](references/spring-boot-integration.md) for complete Spring Boot integration examples including:

- Spring Boot configuration with application properties
- RDS client bean configuration
- Service layer implementation
- REST controller design
- Exception handling
- Testing strategies

### Lambda Integration

Refer to [references/lambda-integration.md](references/lambda-integration.md) for Lambda integration examples including:

- Traditional Lambda + RDS connections
- Lambda with connection pooling
- Using AWS Secrets Manager for credentials
- Lambda with AWS SDK for RDS management
- Security configuration and best practices

## Advanced Operations

### Modifying DB Instances

```java
ModifyDbInstanceRequest request = ModifyDbInstanceRequest.builder()
    .dbInstanceIdentifier(dbInstanceIdentifier)
    .dbInstanceClass(newInstanceClass)
    .applyImmediately(false)
    .build();
rdsClient.modifyDBInstance(request);
```

### Deleting DB Instances

```java
// VALIDATION CHECKPOINT: Verify instance exists and check status
DBInstance instance = rdsClient.describeDBInstances(
    DescribeDbInstancesRequest.builder().dbInstanceIdentifier(dbInstanceIdentifier).build()
).dbInstances().get(0);

if ("available".equals(instance.dbInstanceStatus())) {
    DeleteDbInstanceRequest request = DeleteDbInstanceRequest.builder()
        .dbInstanceIdentifier(dbInstanceIdentifier)
        .skipFinalSnapshot(false)
        .finalDBSnapshotIdentifier(snapshotId)
        .build();
    rdsClient.deleteDBInstance(request);
}
```

## Examples

### Complete RDS Instance Creation with Validation

```java
public String createSecurePostgreSQLInstance(RdsClient rdsClient,
                                            String instanceIdentifier,
                                            String dbName,
                                            String masterUsername,
                                            String masterPassword,
                                            String vpcSecurityGroupId) {
    // Create instance with security settings
    CreateDbInstanceRequest request = CreateDbInstanceRequest.builder()
        .dbInstanceIdentifier(instanceIdentifier)
        .dbName(dbName)
        .masterUsername(masterUsername)
        .masterUserPassword(masterPassword)
        .engine("postgres")
        .engineVersion("15.4")
        .dbInstanceClass("db.t3.micro")
        .allocatedStorage(20)
        .storageEncrypted(true)
        .vpcSecurityGroupIds(vpcSecurityGroupId)
        .publiclyAccessible(false)
        .multiAZ(true)
        .backupRetentionPeriod(7)
        .deletionProtection(true)
        .build();

    rdsClient.createDBInstance(request);

    // VALIDATION: Wait for instance availability
    rdsClient.waiter().waitUntilDBInstanceAvailable(
        DescribeDbInstancesRequest.builder().dbInstanceIdentifier(instanceIdentifier).build()
    );
    System.out.println("Instance " + instanceIdentifier + " is available!");
    return instanceIdentifier;
}
```

## Best Practices

**Security**: Enable encryption (`storageEncrypted=true`), use VPC security groups, disable public access.

**High Availability**: Enable Multi-AZ for production workloads.

**Backups**: Configure automated backups with 7+ day retention.

**Deletion Protection**: Enable `deletionProtection(true)` for production databases.

**Resource Management**: Always close clients with try-with-resources:
```java
try (RdsClient rdsClient = RdsClient.builder().region(Region.US_EAST_1).build()) {
    // Use client
}
```

## Dependencies

```xml
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>rds</artifactId>
    <version>2.20.0</version>
</dependency>
<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>42.6.0</version>
</dependency>
```

## Reference Documentation

For detailed API reference, see:
- [API Reference](references/api-reference.md) - Complete API documentation and data models
- [Spring Boot Integration](references/spring-boot-integration.md) - Spring Boot patterns and examples
- [Lambda Integration](references/lambda-integration.md) - Lambda function patterns and best practices

## Error Handling

See [API Reference](references/api-reference.md#error-handling) for comprehensive error handling patterns including common exceptions, error response structure, and pagination support.

## Constraints and Warnings

- **Instance Limits**: Account limits on DB instances per region
- **Multi-AZ Costs**: Approximately doubles compute costs
- **Snapshot Costs**: Manual snapshots billed per storage used
- **Deletion Protection**: Cannot delete instances with protection enabled
- **Maintenance Windows**: Instances may be unavailable during updates

© giuseppe-trisciuoglio · MIT · giuseppe-trisciuoglio/developer-kit

Similar skills

Everything for Cloud: AWS, Azure, GCP →

From the same set93

spring-boot-cache Configures caching in Spring Boot services using Caffeine, Redis, or Ehcache providers. Helps set up TTL policies, apply cache annotations, and trace cache misses. CX Codex +1 3,800installs zod-validation-utilities Guides Zod v4 validation for TypeScript APIs, forms, and configuration. Use it when external input needs parsing, coercion, and clear validation errors. CX Codex +1 3,800installs spring-boot-event-driven-patterns A Spring Boot 3.x skill for domain events, @TransactionalEventListener, Kafka messaging and the transactional outbox pattern. Useful when sync calls between services need to become events. CX Codex +1 3,800installs chunking-strategy Configures document chunking workflows and overlap for RAG pipelines and vector search. It validates semantic coherence and tunes retrieval precision. CX Codex +1 3,800installs aws-sdk-java-v2-kms This skill provides AWS KMS patterns for AWS SDK for Java 2.x, covering keys, encryption, data keys, signatures, and Spring Boot integration. CX Codex +1 3,700installs aws-sdk-java-v2-secrets-manager A skill for pulling AWS Secrets Manager values into Java services: retrieval, caching, rotation-aware access and Spring Boot wiring. CX Codex +1 3,700installs aws-sdk-java-v2-messaging Code patterns for AWS SQS and SNS using AWS SDK for Java 2.x. Helps configure clients, handle FIFO queues, set up DLQ, and integrate messaging into Spring Boot. CX Codex +1 3,700installs aws-sdk-java-v2-bedrock A skill that shows your agent how to call Amazon Bedrock models from AWS SDK for Java 2.x: text, images, embeddings and streaming. CX Codex +1 3,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor