Java
The AWS SDK for Java 2.x works with Zata. Point the S3 client at the Zata endpoint, and you can use the normal S3 calls from Java, including Spring Boot apps.
software.amazon.awssdk:s3) on Java 21 on Zata in October 2026.Before you start
- A bucket. See Create a bucket.
- An access key and secret key from the same region as the bucket. See Access keys.
Connection settings
Add the SDK
Maven
Gradle
Create the client
Keep your keys out of the code. Put them in environment variables; the SDK reads them by itself:
Then create the client. For a bucket in Mumbai, use https://bom01.zata.ai.
The two WHEN_REQUIRED lines are required. With the SDK’s default settings (version 2.30 and newer), every upload to Zata fails with XAmzContentSHA256Mismatch, even small files.
Upload, download and list files
To upload a file from disk, use RequestBody.fromFile(Paths.get("myfile.txt")) (with import java.nio.file.Paths;).
List your buckets
A sub-user’s key gets an empty list here, even for buckets it can use. Use the bucket name directly.
Make a download link
A presigned URL lets someone download one file without keys, until the link expires.
Anyone who has the link can use it until it expires, so share it only with the intended person.
Troubleshooting
For other errors, see Large uploads and Wrong endpoint or region.