Skip to content

/aws-sdk-java-v2-rds

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.

shell
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-rds --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/aws-sdk-java-v2-rds
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

SKILL.md

aws-sdk-java-v2-rds.SKILL.md
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:**

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:**

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

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

Key Operations

Creating DB Instances

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

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

Managing DB Snapshots

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

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

Deleting DB Instances

// 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

public String createSecurePostgreSQLInstance(RdsClient rdsClient,
                                            String instanceIdentifier,
                                            Strin
Read more
Read it on GitHub ↗

Showing the first part of this file.

Ships withdeveloper-kit

Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI.

Get the whole plugin, auto-invoked
Stats
315
Stars
0
Views
37
Forks
Maintained
Maintenance
Python
Language
MIT
License
1mo ago
Last commit
9mo ago
Created

Repo: giuseppe-trisciuoglio/developer-kit

Other skills on developer-kit.