aws-sdk-java-v2-core

Configure AWS SDK for Java 2.x clients with authentication, timeouts, and HTTP settings.

322|37|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-sdk-java-v2-core
Source: https://github.com/giuseppe-trisciuoglio/developer-kit/tree/main/skills/aws-java/aws-sdk-java-v2-core
Command: npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides essential patterns for configuring AWS SDK v2 clients, credential management, timeouts, HTTP clients, and general best practices.

Core Features & Use Cases

  • Client configuration, credentials, and timeouts
  • HTTP client options (Apache, Netty, URLConnection)
  • Observability and error handling patterns
  • Spring Boot integration basics

Quick Start

Create a basic S3 client with region set and default credentials; extend with a custom HTTP client if needed.

Frequently Asked Questions about aws-sdk-java-v2-core

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

FAQPage Schema
How do I configure AWS SDK v2 clients for Java applications?

Configure AWS SDK v2 clients using client builders, setting region, credentials provider, and HTTP client. The builder pattern lets you customize authentication, timeouts, and connection pooling before instantiating service clients for S3, DynamoDB, or other AWS services.

What are the best practices for managing AWS credentials in Java applications?

AWS SDK v2 supports multiple credential providers—default chain, IAM roles, environment variables, and profiles. Use the credential chain for automatic detection in production, explicitly specify providers for local development, and avoid hardcoding secrets in code.

Can I use AWS SDK v2 with Spring Boot?

Yes, AWS SDK v2 integrates with Spring Boot through client builder configuration in beans or application properties. Spring Boot simplifies credential resolution and lifecycle management for multiple AWS service clients in the same application.

How do I set timeouts and configure the HTTP client in AWS SDK v2?

Configure timeouts and HTTP client implementation via the client builder. Choose Apache, Netty, or URLConnection as the underlying HTTP transport, then set connection timeout, socket timeout, and retry policies to match your application's latency and reliability requirements.

How do I test AWS SDK v2 clients locally with LocalStack or Testcontainers?

Point the SDK client to a LocalStack or Testcontainers endpoint by overriding the service endpoint URL in the builder. Mock AWS services run in containers, letting you test credential flows, client configuration, and error handling without hitting production AWS.

How do I enable CloudWatch metrics and error handling with AWS SDK v2?

AWS SDK v2 publishes metrics and logs automatically when configured. Enable retry policies through the builder, use ExecutionInterceptors for custom error handling, and CloudWatch captures request-level metrics, latency, and failure rates for observability.