aws-sdk-java-v2-secrets-manager

Manage AWS Secrets Manager secrets with the AWS SDK for Java 2.x.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/rizaldiem/digital-invitation-web_V2 --skill aws-sdk-java-v2-secrets-manager-rizaldiem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-sdk-java-v2-secrets-manager
Source: https://github.com/rizaldiem/digital-invitation-web_V2/tree/main/.windsurf/skills/aws-sdk-java-v2-secrets-manager
Command: npx skills add https://github.com/rizaldiem/digital-invitation-web_V2 --skill aws-sdk-java-v2-secrets-manager-rizaldiem

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates insecure secret handling and manual credential management by providing concrete patterns and code for storing, retrieving, rotating, and caching secrets in AWS Secrets Manager using the AWS SDK for Java 2.x.

Core Features & Use Cases

  • Programmatic Secret Management: Create, retrieve, update, delete, list, and restore secrets via the SDK.
  • Secret Rotation: Lambda-based rotation patterns and immediate rotation support to automate credential rotation.
  • Caching & Performance: Integration with the aws-secretsmanager-caching-java library to reduce API calls and improve latency with configurable TTL and cache sizing.
  • Spring Boot Integration: Configuration examples for SecretsManagerClient beans, SecretCache usage, property source integration, and dynamic DataSource wiring using secret-backed credentials.
  • Security & Operations: Guidance on KMS encryption, least-privilege IAM policies, CloudTrail auditing, error handling, and troubleshooting CLI checks.

Quick Start

Create a SecretsManagerClient configured for your region and call getSecretValue for the secret name prod/database/credentials to retrieve database credentials into your application.

Frequently Asked Questions about aws-sdk-java-v2-secrets-manager

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I retrieve AWS Secrets Manager secrets in a Java Spring Boot application?

To retrieve AWS Secrets Manager secrets in Java Spring Boot, instantiate a SecretsManagerClient and call getSecretValue for the secret name. You can wire the retrieved credentials directly into your DataSource configuration.

What is the best way to cache AWS Secrets Manager values in Java to reduce API calls?

The best way to cache AWS Secrets Manager values in Java is integrating the aws-secretsmanager-caching-java library. It improves latency and reduces API calls through configurable cache sizing and TTL settings.

Does AWS SDK for Java 2.x support Lambda-based secret rotation?

Yes, AWS SDK for Java 2.x supports Lambda-based secret rotation. It provides programmatic patterns and immediate rotation support to automate credential rotation for database credentials, API keys, and tokens.

Can I use AWS Secrets Manager for database credentials in multi-region Java deployments?

Yes, you can use AWS Secrets Manager for database credentials in multi-region Java deployments. The SDK supports region-specific client instantiation to securely access secrets across different geographic regions.

How do I configure least-privilege IAM policies for accessing secrets in AWS Secrets Manager?

To configure least-privilege IAM policies for accessing secrets in AWS Secrets Manager, restrict permissions to only necessary actions like getSecretValue. The skill provides guidance on KMS encryption and CloudTrail auditing for secure operations.

Why does my Java application fail when dynamically updating database credentials from AWS Secrets Manager?

Your Java application may fail when dynamically updating database credentials from AWS Secrets Manager due to connectivity or IAM permission issues. The skill provides troubleshooting CLI checks and error handling guidance for secure retrieval operations.