
Aws Sdk Java V2 S3
Wire Java AWS SDK v2 S3 clients—sync, async, transfer manager, retries—for object storage in backend services.
Overview
AWS SDK Java v2 S3 is an agent skill for the Build phase that implements S3 client setup and basic operations with AWS SDK for Java 2.x including sync, async, and retry configuration.
Install
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-s3What is this skill?
- Maven coordinates for s3, s3-transfer-manager, and netty-nio-client (AWS SDK Java v2.20.x examples)
- Synchronous S3Client and S3AsyncClient builder setup with Region configuration
- Configured client pattern: Apache HTTP client max connections, connection timeout, exponential retry backoff
- Covers basic object operations scaffolding from official SDK v2 style APIs
- Separation of sync vs async client choices for throughput-sensitive uploads
- AWS SDK Java v2 example version 2.20.0 in dependency snippets
- Apache HTTP client maxConnections(200) and 5s connection timeout in configured client example
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 need reliable S3 uploads and downloads in Java but keep mixing SDK v1 snippets, wrong Maven modules, or clients without retry and connection limits.
Who is it for?
Solo builders shipping Java/Kotlin backends on AWS who store blobs, exports, or user files in S3.
Skip if: Python or Node S3 workflows, or teams that only need Terraform bucket provisioning without application SDK code.
When should I use this skill?
Implementing or debugging Java S3 integration with AWS SDK v2—client builders, dependencies, sync/async choice, or retry configuration.
What do I get? / Deliverables
You get working S3Client and S3AsyncClient setup with documented dependencies and a tuned synchronous client template ready for bucket CRUD and transfer workflows.
- S3Client and/or S3AsyncClient initialization code
- Maven dependency block for S3 and optional transfer/async modules
- Production-oriented client configuration with retry and HTTP limits
Recommended Skills
Journey fit
S3 integration code is core backend build work when your product persists files, exports, or static assets in AWS. Backend subphase is where service-side SDK setup, bucket operations, and upload/download patterns are implemented.
How it compares
Application-level Java SDK patterns, not an MCP server or AWS Console click-through guide.
Common Questions / FAQ
Who is aws-sdk-java-v2-s3 for?
Indie developers building JVM APIs, workers, or CLIs that read and write objects in S3 with AWS SDK v2.
When should I use aws-sdk-java-v2-s3?
During build backend work when adding storage integration—choosing sync vs async clients, transfer manager deps, and retry-aware HTTP configuration.
Is aws-sdk-java-v2-s3 safe to install?
It is documentation-style code guidance; credentials and network access remain your responsibility—review the Security Audits panel on this Prism page before install.
SKILL.md
READMESKILL.md - Aws Sdk Java V2 S3
# S3 Client Setup and Basic Operations ## Dependencies ```xml <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>s3</artifactId> <version>2.20.0</version> </dependency> <!-- For S3 Transfer Manager --> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>s3-transfer-manager</artifactId> <version>2.20.0</version> </dependency> <!-- For async operations --> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>netty-nio-client</artifactId> <version>2.20.0</version> </dependency> ``` ## Client Setup ### Basic Synchronous Client ```java import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.s3.S3Client; S3Client s3Client = S3Client.builder() .region(Region.US_EAST_1) .build(); ``` ### Basic Asynchronous Client ```java import software.amazon.awssdk.services.s3.S3AsyncClient; S3AsyncClient s3AsyncClient = S3AsyncClient.builder() .region(Region.US_EAST_1) .build(); ``` ### Configured Client with Retry Logic ```java import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.core.retry.RetryPolicy; import software.amazon.awssdk.core.retry.backoff.ExponentialRetryBackoff; import java.time.Duration; S3Client s3Client = S3Client.builder() .region(Region.US_EAST_1) .httpClientBuilder(ApacheHttpClient.builder() .maxConnections(200) .connectionTimeout(Duration.ofSeconds(5))) .overrideConfiguration(b -> b .apiCallTimeout(Duration.ofSeconds(60)) .apiCallAttemptTimeout(Duration.ofSeconds(30)) .retryPolicy(RetryPolicy.builder() .numRetries(3) .retryBackoffStrategy(ExponentialRetryBackoff.builder() .baseDelay(Duration.ofSeconds(1)) .maxBackoffTime(Duration.ofSeconds(30)) .build()) .build())) .build(); ``` ## Bucket Operations ### Create Bucket ```java import software.amazon.awssdk.services.s3.model.*; public void createBucket(S3Client s3Client, String bucketName) { try { CreateBucketRequest request = CreateBucketRequest.builder() .bucket(bucketName) .build(); s3Client.createBucket(request); // Wait until bucket is ready HeadBucketRequest waitRequest = HeadBucketRequest.builder() .bucket(bucketName) .build(); s3Client.waiter().waitUntilBucketExists(waitRequest); System.out.println("Bucket created successfully: " + bucketName); } catch (S3Exception e) { System.err.println("Error creating bucket: " + e.awsErrorDetails().errorMessage()); throw e; } } ``` ### List All Buckets ```java public List<String> listAllBuckets(S3Client s3Client) { ListBucketsResponse response = s3Client.listBuckets(); return response.buckets().stream() .map(Bucket::name) .collect(Collectors.toList()); } ``` ### Check if Bucket Exists ```java public boolean bucketExists(S3Client s3Client, String bucketName) { try { HeadBucketRequest request = HeadBucketRequest.builder() .bucket(bucketName) .build(); s3Client.headBucket(request); return true; } catch (NoSuchBucketException e) { return false; } } ``` ## Basic Object Operations ### Upload File ```java import software.amazon.awssdk.core.sync.RequestBody; import java.nio.file.Paths; public void uploadFile(S3Client s3Client, String bucketName, String key, String filePath) { PutObjectRequest request = PutObjectRequest.builder() .bucket(bucketName) .key(key) .build(); s3Client.putObject(request, RequestBody.fromFile(Paths.get(filePath))); System.out.println("File uploaded: " + key); } ``` ### Download File ```java import java.nio.file.Paths; public void downloadFile(S3Client s3Client, String bucketName, String key, String destPath) { GetObjectRequest request