
Aws Sdk Java V2 Core
Configure AWS SDK for Java 2.x service clients with builders, regions, credentials, timeouts, retries, and metrics the way the v2 API expects.
Overview
aws-sdk-java-v2-core is an agent skill for the Build phase that teaches correct AWS SDK for Java 2.x client builders, configuration, and lifecycle patterns.
Install
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-coreWhat is this skill?
- Documents AwsClient, SdkClient, and ClientBuilder base interfaces
- Shows ClientOverrideConfiguration for apiCallTimeout and per-attempt timeouts
- Covers credentialsProvider, region(Region), and custom HttpClient selection
- Explains RetryPolicy hooks and CloudWatch MetricPublisher wiring
- Builder-first pattern: region + credentials + overrideConfiguration + build()
Adoption & trust: 1.1k installs on skills.sh; 271 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are adding AWS calls in Java but the agent mixes v1 idioms or leaves default timeouts and retries that fail silently in production.
Who is it for?
Indie developers on Spring Boot, Micronaut, or plain Java services integrating AWS APIs with typed v2 clients.
Skip if: Greenfield projects on Node or Python-only stacks, or teams doing exclusively AWS CDK/Terraform with no JVM runtime code.
When should I use this skill?
User asks for AWS SDK Java 2.x client setup, ClientBuilder, ClientOverrideConfiguration, or migrating off SDK v1.
What do I get? / Deliverables
You get Java snippets with SdkClient builders, ClientOverrideConfiguration, credentials, and HTTP client choices consistent with SDK 2.x.
- Java client factory or bean wiring snippet with region and credentials
- Shared ClientOverrideConfiguration module for timeouts, retries, and metrics
Recommended Skills
Journey fit
Build is canonical because the skill documents how to instantiate and configure Java AWS clients while you implement cloud-backed features. Integrations fits wiring S3, DynamoDB, SQS, and other SDK clients into your JVM service with shared override configuration patterns.
How it compares
In-repo API cheat sheet for Java v2 clients—not a substitute for official AWS docs or an MCP server for live AWS control plane.
Common Questions / FAQ
Who is aws-sdk-java-v2-core for?
Solo JVM builders who want agents to emit AWS SDK 2.x client setup code with correct builders, regions, and timeout configuration.
When should I use aws-sdk-java-v2-core?
Use it in Build / integrations while coding S3, DynamoDB, SQS, or other AWS service clients; revisit in Operate when tuning timeouts after incidents.
Is aws-sdk-java-v2-core safe to install?
It is documentation-only patterns for client construction—review generated code for least-privilege IAM and check the Security Audits panel on this Prism page.
SKILL.md
READMESKILL.md - Aws Sdk Java V2 Core
# AWS SDK for Java 2.x API Reference ## Core Client Classes ### AwsClient Base interface for all AWS service clients. ```java public interface AwsClient extends AutoCloseable { // Base client interface } ``` ### SdkClient Enhanced client interface with SDK-specific features. ```java public interface SdkClient extends AwsClient { // Enhanced client methods } ``` ## Client Builders ### ClientBuilder Base builder interface for all AWS service clients. **Key Methods:** - `region(Region region)` - Set AWS region - `credentialsProvider(CredentialsProvider credentialsProvider)` - Configure authentication - `overrideConfiguration(ClientOverrideConfiguration overrideConfiguration)` - Override default settings - `httpClient(HttpClient httpClient)` - Specify HTTP client implementation - `build()` - Create client instance ## Configuration Classes ### ClientOverrideConfiguration Controls client-level configuration including timeouts and metrics. **Key Properties:** - `apiCallTimeout(Duration)` - Total timeout for all retry attempts - `apiCallAttemptTimeout(Duration)` - Timeout per individual attempt - `retryPolicy(RetryPolicy)` - Retry behavior configuration - `metricPublishers(MetricPublisher...)` - Enable metrics collection ### Builder Example ```java ClientOverrideConfiguration config = ClientOverrideConfiguration.builder() .apiCallTimeout(Duration.ofSeconds(30)) .apiCallAttemptTimeout(Duration.ofSeconds(10)) .addMetricPublisher(CloudWatchMetricPublisher.create()) .build(); ``` ## HTTP Client Implementations ### ApacheHttpClient Synchronous HTTP client with advanced features. **Builder Configuration:** - `maxConnections(Integer)` - Maximum concurrent connections - `connectionTimeout(Duration)` - Connection establishment timeout - `socketTimeout(Duration)` - Socket read/write timeout - `connectionTimeToLive(Duration)` - Connection lifetime - `proxyConfiguration(ProxyConfiguration)` - Proxy settings ### NettyNioAsyncHttpClient Asynchronous HTTP client for high-performance applications. **Builder Configuration:** - `maxConcurrency(Integer)` - Maximum concurrent operations - `connectionTimeout(Duration)` - Connection timeout - `readTimeout(Duration)` - Read operation timeout - `writeTimeout(Duration)` - Write operation timeout - `sslProvider(SslProvider)` - SSL/TLS implementation ### UrlConnectionHttpClient Lightweight HTTP client using Java's URLConnection. **Builder Configuration:** - `socketTimeout(Duration)` - Socket timeout - `connectTimeout(Duration)` - Connection timeout ## Authentication and Credentials ### Credential Providers #### EnvironmentVariableCredentialsProvider Reads credentials from environment variables. ```java CredentialsProvider provider = EnvironmentVariableCredentialsProvider.create(); ``` #### SystemPropertyCredentialsProvider Reads credentials from Java system properties. ```java CredentialsProvider provider = SystemPropertyCredentialsProvider.create(); ``` #### ProfileCredentialsProvider Reads credentials from AWS configuration files. ```java CredentialsProvider provider = ProfileCredentialsProvider.create("profile-name"); ``` #### StaticCredentialsProvider Provides static credentials (not recommended for production). ```java AwsBasicCredentials credentials = AwsBasicCredentials.create("key", "secret"); CredentialsProvider provider = StaticCredentialsProvider.create(credentials); ``` #### DefaultCredentialsProvider Implements the default credential provider chain. ```java CredentialsProvider provider = DefaultCredentialsProvider.create(); ``` ### SSO Authentication #### AwsSsoCredentialsProvider Enables SSO-based authentication. ```java AwsSsoCredentialsProvider ssoProvider = AwsSsoCredentialsProvider.builder() .ssoProfile("my-sso-profile") .build(); ``` ## Error Handling Classes ### SdkClientException Client-side exceptions (network, timeout, configuration issues). ```java try { awsOperation(); } catch (SdkClientException e) { // Handl