giuseppe-trisciuoglio/aws-sdk-java-v2-secrets-manager
Provides AWS Secrets Manager patterns for AWS SDK for Java 2.x, including secret retrieval, caching, rotation-aware access, and Spring Boot integration. Use when storing or reading secrets in Java services, replacing hardcoded credentials, or wiring secret-backed configuration into applications.
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-secrets-manager
Use this skill to manage application secrets with AWS Secrets Manager from Java services.
It focuses on the operational flow that matters in production:
Keep large API notes and extended setup details in the bundled references.
Use this skill when:
AWSCURRENT and AWSPENDINGTypical trigger phrases include java secrets manager, spring boot secret, aws secret cache, load db credentials from secrets manager, and rotate secret.
Decide:
Prefer JSON secrets for multi-field credentials such as database connection details.
Use a single SecretsManagerClient with explicit region and the default credential provider chain unless the environment requires something more specific.
Keep client creation in configuration code, not in business services.
At the integration boundary:
GetSecretValueRequestsecretString() or include it in thrown exception messagesUse caching when:
Document cache TTL expectations clearly, especially if the secret rotates.
If the secret rotates:
AWSPENDING during verification workflowsBefore shipping:
@Configuration
public class SecretsConfiguration {
@Bean
SecretsManagerClient secretsManagerClient() {
return SecretsManagerClient.builder()
.region(Region.of("eu-south-2"))
.credentialsProvider(DefaultCredentialsProvider.create())
.build();
}
}
@Service
public class SecretsService {
private final SecretsManagerClient client;
private final ObjectMapper objectMapper;
public SecretsService(SecretsManagerClient client, ObjectMapper objectMapper) {
this.client = client;
this.objectMapper = objectMapper;
}
public DatabaseSecret loadDatabaseSecret(String secretId) throws JsonProcessingException {
GetSecretValueResponse response = client.getSecretValue(
GetSecretValueRequest.builder().secretId(secretId).build()
);
return objectMapper.readValue(response.secretString(), DatabaseSecret.class);
}
}
public class CachedSecretsService {
private final SecretCache cache;
public CachedSecretsService(SecretsManagerClient client) {
this.cache = new SecretCache(client);
}
public String apiToken(String secretId) {
return cache.getSecretString(secretId);
}
}
Use this pattern only when the application can tolerate the chosen cache refresh behavior.
references/api-reference.mdreferences/caching-guide.mdreferences/spring-boot-integration.mdaws-sdk-java-v2-coreaws-sdk-java-v2-kmsspring-boot-dependency-injectionTake giuseppe-trisciuoglio/aws-sdk-java-v2-secrets-manager from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.