Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
giuseppe-trisciuoglio avatar

Aws Sdk Java V2 Secrets Manager

  • 1.7k installs
  • 318 repo stars
  • Updated June 22, 2026
  • giuseppe-trisciuoglio/developer-kit

aws-sdk-java-v2-secrets-manager is an agent skill that 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 sto

About

aws-sdk-java-v2-secrets-manager is an agent skill from giuseppe-trisciuoglio/developer-kit that 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 ser. # AWS SDK for Java 2.x - AWS Secrets Manager ## Overview Use this skill to manage application secrets with AWS Secrets Manager from Java services. It focuses on the operational flow that matters in production: - how to retrieve and deserialize secrets safely - when to add local caching - how to integrate secret access into Spring Boot without le Developers invoke aws-sdk-java-v2-secrets-manager during operate/infra work for cloud & infrastructure tasks. The skill documents triggers, prerequisites, and step-by-step workflows grounded in SKILL.md.

  • AWS SDK for Java 2.x - AWS 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:
  • how to retrieve and deserialize secrets safely
  • how to integrate secret access into Spring Boot without leaking values into logs or configuration files

Aws Sdk Java V2 Secrets Manager by the numbers

  • 1,715 all-time installs (skills.sh)
  • +123 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #222 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

aws-sdk-java-v2-secrets-manager capabilities & compatibility

Capabilities
aws sdk for java 2.x aws secrets manager · use this skill to manage application secrets wit · it focuses on the operational flow that matters · how to retrieve and deserialize secrets safely · how to integrate secret access into spring boot
Use cases
orchestration
From the docs

What aws-sdk-java-v2-secrets-manager says it does

Use this skill to manage application secrets with AWS Secrets Manager from Java services.
SKILL.md
It focuses on the operational flow that matters in production:
SKILL.md
- how to retrieve and deserialize secrets safely
SKILL.md
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-secrets-manager

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.7k
repo stars318
Security audit3 / 3 scanners passed
Last updatedJune 22, 2026
Repositorygiuseppe-trisciuoglio/developer-kit

What it does

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 ser

Who is it for?

Developers working on cloud & infrastructure during operate tasks.

Skip if: Tasks outside Cloud & Infrastructure scope described in SKILL.md.

When should I use this skill?

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 ser

What you get

Completed cloud & infrastructure workflow aligned with SKILL.md steps.

  • spring configuration class
  • secretsmanagerclient bean
  • cached secret access

Files

SKILL.mdMarkdownGitHub ↗

AWS SDK for Java 2.x - AWS Secrets Manager

Overview

Use this skill to manage application secrets with AWS Secrets Manager from Java services.

It focuses on the operational flow that matters in production:

  • how to retrieve and deserialize secrets safely
  • when to add local caching
  • how to integrate secret access into Spring Boot without leaking values into logs or configuration files

Keep large API notes and extended setup details in the bundled references.

When to Use

Use this skill when:

  • replacing hardcoded passwords, API keys, or tokens with managed secrets
  • loading database credentials or third-party API credentials at runtime
  • adding caching to reduce Secrets Manager latency and API cost
  • handling secret version stages such as AWSCURRENT and AWSPENDING
  • wiring secret access into Spring Boot beans or configuration services
  • preparing rotation-aware applications or Lambda rotation workflows

Typical trigger phrases include java secrets manager, spring boot secret, aws secret cache, load db credentials from secrets manager, and rotate secret.

Instructions

1. Model the secret before writing access code

Decide:

  • the secret name and path convention
  • whether the value is plain text or structured JSON
  • which application boundary is allowed to read it
  • whether the caller needs the latest value on every request or can tolerate a cache

Prefer JSON secrets for multi-field credentials such as database connection details.

2. Create one reusable client per application configuration

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.

3. Retrieve and deserialize at the boundary layer

At the integration boundary:

  • fetch with GetSecretValueRequest
  • deserialize JSON into a typed object or validated map
  • convert AWS exceptions into application-level errors
  • never log secretString() or include it in thrown exception messages

4. Add caching only where it solves a real problem

Use caching when:

  • the secret is read frequently
  • latency matters for startup or request handling
  • the cost of repeated lookups is material

Document cache TTL expectations clearly, especially if the secret rotates.

5. Design for rotation and staged versions

If the secret rotates:

  • read through a thin service layer so cache invalidation and retry behavior stay centralized
  • understand which callers must tolerate AWSPENDING during verification workflows
  • test how the application behaves during stale cache windows or partial rotation failures

6. Validate end-to-end behavior

Before shipping:

  • verify IAM permissions and KMS access
  • test missing secret, wrong region, and decryption failure paths
  • confirm secrets are not surfaced in logs, metrics, or debug endpoints
  • prove database or API clients refresh correctly when credentials rotate

Examples

Example 1: Reusable client and typed secret lookup

@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);
    }
}

Example 2: Cache a hot-path secret lookup

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.

Best Practices

  • Use hierarchical secret names that match domain and environment boundaries.
  • Prefer typed JSON deserialization over string parsing scattered across the codebase.
  • Keep secret retrieval in infrastructure services rather than controllers or entities.
  • Reuse the SDK client and cache instances.
  • Combine least-privilege IAM with KMS permissions and CloudTrail visibility.
  • Make rotation behavior explicit in code and operational docs.

Constraints and Warnings

  • Do not log secret values, serialized secret objects, or decrypted payload fragments.
  • Cached values may remain stale during or after rotation depending on TTL and refresh behavior.
  • Secret access can fail because of IAM policy, KMS policy, region mismatch, or deleted versions; handle these cases explicitly.
  • Automatic rotation is not available for every secret shape or integration.
  • Large or frequently changing secrets may not be good candidates for aggressive in-memory caching.

References

  • references/api-reference.md
  • references/caching-guide.md
  • references/spring-boot-integration.md

Related Skills

  • aws-sdk-java-v2-core
  • aws-sdk-java-v2-kms
  • spring-boot-dependency-injection

Related skills

Forks & variants (1)

Aws Sdk Java V2 Secrets Manager has 1 known copy in the catalog totaling 20 installs. They canonicalize to this original listing.

How it compares

Pick aws-sdk-java-v2-secrets-manager for explicit SDK v2 Spring Boot secret caching; use IAM instance roles with Spring Cloud AWS when you want zero client boilerplate.

FAQ

What does aws-sdk-java-v2-secrets-manager do?

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 ser

When should I use aws-sdk-java-v2-secrets-manager?

During operate infra work for cloud & infrastructure.

Is aws-sdk-java-v2-secrets-manager safe to install?

Review the Security Audits panel on this listing before production use.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.