Back to Skills

aws-sdk-java-v2-s3

Provides Amazon S3 patterns and examples using AWS SDK for Java 2.x. Use when working with S3 buckets, uploading/downloading objects, multipart uploads, presigned URLs, S3 Transfer Manager, object operations, or S3-specific configurations.

315stars37forksUpdated 8/1/2026

Security Assessment

Safe(94/100)
Security Score94/100

About aws-sdk-java-v2-s3

This skill is a curated reference of Amazon S3 usage patterns built on the AWS SDK for Java 2.x. It addresses the recurring problem of getting S3 object storage right in Java applications: how to create and manage buckets, upload and download objects with the correct request builders, handle large files, generate temporary access URLs, and wire all of this into a Spring Boot application. Rather than leaving developers to piece together the SDK's fluent builder API from scattered docs, it provides ready-to-adapt code snippets with sensible defaults such as server-side encryption and storage-class selection.

The material covers the core object lifecycle (createBucket with waiters, putObject via RequestBody.fromFile, getObject to a path, batched deleteObjects), presigned URL generation with the S3Presigner and a bounded expiration, and the S3 Transfer Manager for optimized large-file transfers. Reference files go deeper on client setup with retry policies, object operations, transfer patterns, and multi-environment Spring Boot integration including sync/async clients, reactive service templates, metadata-aware uploads, prefix listing, and batch deletes. A quick-reference table maps each operation to its SDK method and storage classes to their use cases.

It targets Java backend developers and cloud engineers integrating S3 into services, particularly Spring Boot teams who need production-oriented configuration examples. Typical use cases include building file-storage features, migrating to SDK v2, adding presigned-URL sharing, and tuning large-file transfers. Credentials are handled through standard providers and externalized environment variables, following normal AWS practice.

FAQ

Which AWS SDK version does this target?

The AWS SDK for Java 2.x. The examples pin S3 and s3-transfer-manager artifacts at version 2.20.0 in the Maven dependency block.

Does it cover large-file uploads?

Yes. It documents the S3 Transfer Manager for optimized transfers and notes multipart uploads for files larger than 100MB, with builder-based UploadFileRequest examples.

How are credentials handled?

Through standard AWS credential providers. The Spring Boot reference shows StaticCredentialsProvider driven by externalized environment variables (AWS_ACCESS_KEY / AWS_SECRET_KEY) in profile-specific property files, which is conventional configuration rather than embedded secrets.

Can I use it with Spring Boot?

Yes. A dedicated reference covers multi-environment configuration, conditional beans for sync/async/transfer-manager/presigner clients, and a reactive S3Service template.

What is the maximum presigned URL expiration?

The quick reference notes a maximum of 7 days for presigned URLs; the example uses a 10-minute signature duration.

All Files

5 files
references/s3-spring-boot-integration.md20.7 KB
View
references/s3-object-operations.md10.4 KB
View
references/s3-transfer-patterns.md14.6 KB
View
references/s3-client-setup.md5.3 KB
View
SKILL.md9.3 KB
View

Install aws-sdk-java-v2-s3

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill