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.