page:guides:spring boot:object client

Configure S3-compatible access for Spring Boot

Summary

Object storage client for a Spring Boot app on Ample. Verified on Spring Boot: bucket credentials delivered as encrypted S3_* environment variables and a validated PutObject/GetObject round-trip linked to a database row (upload=ok linked=ok). Build and start: ./mvnw -q -DskipTests package (or the Gradle wrapper) producing one application jar, then java -jar on the jvm-21 template (Temurin JDK 21) with server.port read from PORT.

Representative Queries

Resource Requirements

Infrastructure Requirements

Prerequisites

Workflow Steps

  1. Build and start: ./mvnw -q -DskipTests package (or the Gradle wrapper) producing one application jar, then java -jar on the jvm-21 template (Temurin JDK 21) with server.port read from PORT; the server must bind 0.0.0.0 on PORT.
  2. Create the bucket and pass its credentials: Create it once with ample bucket create, then pass endpoint, region, bucket and keys with --env; use path-style addressing.
    • Command: ample deploy . --name <name> --public --env S3_ENDPOINT=... --env S3_REGION=... --env S3_BUCKET=... --env S3_ACCESS_KEY_ID=... --env S3_SECRET_ACCESS_KEY=...
  3. Verify: Fetch the live URL and /p/browser-file-uploads on the example; on failure read the build and runtime logs.
    • Command: ample logs <your_log_flags> --kind build

Examples

Success Checks

  1. App responds on its public URL: HTTP GET / should expect ample canary spring boot patterns.
  2. browser-file-uploads check from the example: HTTP GET /p/browser-file-uploads should expect to see the pattern fixture checks.

Limitations

Cost Estimate

Last Verified At

2026-09-21T02:34:39Z

Formats

Next Actions

  1. Browse the catalog index: Operation: GET /v1/catalog
  2. Search published recipes: Operation: POST /v1/catalog/search
  3. Prepare a deployment plan: Operation: POST /v1/catalog/plan