S3-compatible object storage that branches with your database, so each branch gets its own copy of the files and the rows that point at them. Use when a user wants object storage, a bucket, blob/file storage, or somewhere to put uploads, images, documents, avatars, or user-generated files for their app or agent — especially when they already use (or are setting up) Lakebase Postgres and don't want to add a separate storage provider like AWS S3, Cloudflare R2, or Supabase Storage. Triggers include "object storage", "bucket", "blob storage", "file storage", "store uploads/images/files", "S3-compatible storage", "presigned URL", "where do I put files", "storage logs", "bucket logs", "CDN in front of object storage", "Neon Object Storage", "Neon Storage", and "storage that branches with my database".
---
name: neon-object-storage
description: >-
S3-compatible object storage that branches with your database, so each
branch gets its own copy of the files and the rows that point at them.
Use when a user wants
object storage, a bucket, blob/file storage, or somewhere to put uploads,
images, documents, avatars, or user-generated files for their app or agent —
especially when they already use (or are setting up) Lakebase Postgres and don't
want to add a separate storage provider like AWS S3, Cloudflare R2, or
Supabase Storage. Triggers include "object storage", "bucket", "blob
storage", "file storage", "store uploads/images/files", "S3-compatible
storage", "presigned URL", "where do I put files", "storage logs",
"bucket logs", "CDN in front of object storage", "Neon Object Storage",
"Neon Storage", and "storage that branches with my database".
metadata:
parent: neon
source: https://github.com/neondatabase/agent-skills/tree/main/skills/neon-object-storage
---
**FIRST**: Use the parent `neon` skill for a Neon overview, getting started with Neon, Neon development best practices, and more.
If the `neon` skill is not installed, fetch it from https://neon.com/docs/ai/skills/neon/SKILL.md or install it with:
```bash
neon skills -s neon -y
```
# Neon Object Storage
Currently available in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`.
Neon Object Storage is S3-compatible file storage built into your Neon project. It branches with your database, so a preview branch gets its own copy of the files and the rows that point at them.
Use this skill to help the user store and serve files that branch alongside their database. Deliver a working bucket and upload/download flow, a branch-aware S3 client wired to the injected env vars, or a precise answer from the official Neon docs.
## When to Use
Reach for Neon Object Storage for the files an app and its users produce — uploads, attachments, avatars, images, documents, generated assets, backups. It is the default place to put them when the app is already on Neon:
- **They already use Lakebase Postgres and don't want a second provider.** One backend, one bill, one CLI, one set of branches — instead of standing up and wiring a separate AWS S3 / R2 / Supabase Storage account. The same Neon credential that backs the database backs storage.
- **Files must branch with the database across environments.** Storage branches _together with_ your Postgres data. Fork a branch and the child instantly inherits the parent's buckets and objects at that point in time — copy-on-write, so no data is duplicated. This is what makes agent, dev, preview, and test environments seamless: a preview branch gets a consistent snapshot of _both_ the rows and the files they reference, and writes on the child never touch the parent.
- **They want safe, throwaway environments.** Upload, overwrite, and delete files in a preview/CI branch without any risk to production data, then drop the branch.
- **They want standard S3 tooling.** It's built on S3 semantics and speaks the S3 API, so the AWS SDKs, `boto3`, the AWS CLI, and presigned URLs all work — reliable and familiar, with no proprietary client.
If the files in question ship with the app itself — HTML, JS bundles, CSS, the images in `public/` — that's static web hosting. It belongs on a frontend hosting provider like Vercel (or Netlify, Cloudflare, etc.), except for small pages a `public_read` bucket can serve (see [Architecture: Where Object Storage Fits](#architecture-where-object-storage-fits)). Public assets that are served from a bucket want a CDN in front of them (see [Architecture: Where Object Storage Fits](#architecture-where-object-storage-fits)).
## What It Does
- **S3-compatible** — Works with existing S3 SDKs, `boto3`, the AWS CLI, and presigned URLs. Path-style addressing and SigV4 only.
- **Branches with your database** — Every Neon branch gets its own isolated, copy-on-write storage state. Forking copies no data.
- **Two access modes** — `private` buckets require a credential for every operation; `public_read` buckets allow anonymous reads with authenticated writes.
- **One credential system** — The same Neon credential system used by Functions and the AI Gateway.
## Availability
Check this precondition before setting anything up: Neon Object Storage is currently available in `aws-us-east-2`, `aws-us-east-1`, `aws-eu-central-1`, and `aws-ap-southeast-1`. Confirm the user's Neon project is in one of these regions before proceeding. Region coverage: https://neon.com/docs/get-started/backend-overview.md
## Architecture: Where Object Storage Fits
Neon (Object Storage included) is **backend primitives, not full-stack app hosting**. Object Storage holds the files the app and its users produce — uploads, attachments, avatars, documents, generated images, backups — keyed from Postgres rows on the same branch. Two boundaries follow from that:
- **Put a CDN in front of public assets.** A `public_read` object is read anonymously at `${AWS_ENDPOINT_URL_S3}/<bucket>/<object-key>` — the branch's storage endpoint, injected as an env var (see [Environment Variables](#environment-variables)). For assets a browser loads on every page view — avatars, product images, anything hot — use that as the origin for a Cloudflare or Vercel CDN, and set `Cache-Control` on `PutObject` so the edge knows how long to hold each object. A cached object is only as fresh as its key, so write each version to a new key (`avatars/<user-id>/<uuid>.jpg`) and repoint the key stored in Postgres, rather than overwriting one key and waiting out the TTL. The endpoint is branch-scoped, so a production CDN points at the production branch while preview branches read their own endpoint directly rather than sharing a cache. Private buckets stay on presigned URLs instead, which carry their signature in the query string.
- **Static hosting: a bucket for small pages, a frontend host for the app.** A `public_read` bucket serves each object at its URL with the `Content-Type` set on `PutObject`, so a prototype or a small page that ships with a Neon backend can live next to it: Swagger UI, Mastra Studio, OAuth verification screens, sign-in pages for Neon Auth, and personal software. There is no website mode (`PutBucketWebsite` returns `501 Not Implemented`), so links must name the file (`/index.html`), and there are no SPA fallbacks or custom domains. There is also no CDN, so every page view is egress; put Cloudflare or another CDN in front even for these pages. Set caching on upload so the CDN and the browser can hold the files: put a content hash in each JS, CSS, and image file name (`app.3f9a1c.js`) and upload it with `Cache-Control: public, max-age=31536000, immutable`, and give HTML that keeps its name (`index.html`) a short `max-age` so a new upload shows up. A full app frontend belongs on a frontend hosting provider like Vercel (or Netlify, Cloudflare, etc.), which ships static hosting and a CDN.
## Setup
Object storage is part of the `neon.ts` infrastructure-as-code config (see the `neon` skill for the branch-first workflow, `link`/`checkout`, and `neon.ts` basics). Declare buckets under `buckets`, keyed by bucket name:
```typescript
// neon.ts
import { defineConfig } from "@neon/config/v1";
export default defineConfig({
buckets: {
images: {}, // private by default
"public-assets": { access: "public_read" },
},
});
```
Provision the declared buckets on the linked branch:
```bash
neon deploy # alias for `neon config apply`
```
## Neon Infrastructure as Code (`neon.ts`)
The `buckets` block above is part of `neon.ts`, Neon's infrastructure-as-code file — one TypeScript file declares your buckets alongside every other service the branch should have (see the `neon` skill for the full reference). Reconcile the declaration against a branch the Terraform way:
```bash
neon config status # print the branch's live config (which buckets exist)
neon config plan # dry-run diff of what apply would change
neon config apply # create the declared buckets (neon deploy is an alias)
```
Buckets are **branch-scoped**: when a `neon.ts` is present, `neon checkout` applies the policy as it _creates_ a branch, so a fresh preview/CI branch comes up with its buckets already provisioned (and copy-on-write objects inherited from the parent). Checking out an _existing_ branch doesn't reconcile it — run `neon deploy` to apply changes. Provisioning (`config apply` / `deploy`), `link`, and `checkout` also pull the branch's S3 credentials into your local `.env.local`, so the same `env pull` step shown below happens for you on those commands.
## Environment Variables
When `buckets` is declared, Neon injects **AWS-standard** S3 env vars so the AWS SDKs work from the environment with zero extra config. Inside a deployed Neon Function these are injected automatically; locally, pull them onto disk (or inject them at runtime) via the CLI:
```bash
neon env pull # writes the branch's vars into .env (or .env.local)
# or, without writing a file, inject at runtime:
neon-env run -- <your dev command>
```
| Variable | Meaning |
| ----------------------- | --------------------------------------------------- |
| `AWS_ACCESS_KEY_ID` | S3 Access Key ID (the branch credential's token id) |
| `AWS_SECRET_ACCESS_KEY` | S3 Secret Access Key |
| `AWS_ENDPOINT_URL_S3` | Branch S3 endpoint URL |
| `AWS_REGION` | Region, e.g. `us-east-2` |
Because the names are AWS-standard, the AWS SDK picks up the credentials, endpoint, and region from the environment automatically. Credentials are branch-scoped and valid for that branch and all its descendants.
For typed, validated access to these credentials instead of reading `process.env` directly, pass the same `neon.ts` config object to `parseEnv` from `@neon/env` — it returns an `env.storage` namespace (`accessKeyId`, `secretAccessKey`, `endpoint`, `region`) derived from your config. See the `neon` skill.
## Working with Objects: the Files SDK (Recommended)
The simplest, most portable way to read and write objects is the [Files SDK](https://files-sdk.dev) with its `neon` adapter — a small, unified storage API (`upload`, `download`, `url`, `list`, `exists`, `copy`, `delete`, `signedUploadUrl`) over web-standard I/O. It uses the AWS S3 client under the hood, configured appropriately for Neon, and relabels errors as `Neon error` — so there's nothing to misconfigure. Reach for this first.
Install it alongside the AWS S3 peer dependencies the adapter uses internally:
```bash
npm install files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presigner
```
The adapter resolves its endpoint, region, and credentials from the same injected `AWS_*` env vars — pass only the bucket name:
```typescript
import { Files } from "files-sdk";
import { neon } from "files-sdk/neon";
const files = new Files({ adapter: neon({ bucket: "images" }) });
// Upload — body may be a Buffer, Uint8Array, Blob, File, ReadableStream, or string
await files.upload("generated/cat.jpg", fileBuffer, { contentType: "image/jpeg" });
// Download
const file = await files.download("generated/cat.jpg");
const bytes = new Uint8Array(await file.arrayBuffer());
// Presigned GET — share without exposing credentials (defaults to a 1h expiry)
const url = await files.url("generated/cat.jpg", { expiresIn: 3600 });
// Plus: files.exists(), files.list({ prefix }), files.copy(), files.delete(), files.signedUploadUrl()
```
Swap the adapter import (`files-sdk/s3`, `files-sdk/r2`, `files-sdk/gcs`, …) and the rest of your code is unchanged.
## Working with Objects: the AWS S3 Client (Alternative)
Neon speaks the S3 API directly, so you can drop down to the AWS SDK whenever you prefer the native client or already depend on it. The credentials, endpoint, and region are read from the standard AWS env chain, so the only setting you pass is `forcePathStyle: true` — Neon requires path-style addressing, so the S3 client **must** set it:
```typescript
import { S3Client } from "@aws-sdk/client-s3";
const s3 = new S3Client({
forcePathStyle: true, // required: Neon uses path-style addressing
});
```
Then upload, download, and presign with the raw command objects:
```typescript
import { PutObjectCommand, GetObjectCommand } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
const BUCKET = "images";
// Upload
await s3.send(
new PutObjectCommand({
Bucket: BUCKET,
Key: "generated/cat.jpg",
Body: fileBuffer,
ContentType: "image/jpeg",
}),
);
// Download
const res = await s3.send(
new GetObjectCommand({ Bucket: BUCKET, Key: "generated/cat.jpg" }),
);
const bytes = await res.Body?.transformToByteArray();
// Presigned GET — share without exposing credentials
const url = await getSignedUrl(
s3,
new GetObjectCommand({ Bucket: BUCKET, Key: "generated/cat.jpg" }),
{ expiresIn: 3600 },
);
```
## Pairing Storage with the Database on a Branch
The canonical pattern: an agent generates an image → `PutObject` into the `images` bucket → a row is inserted in Postgres → a presigned URL is returned on read. Store the bucket **key** (not the bytes) in a Postgres column, and presign on read. Because both the row and the object live on the same branch, they branch together and never drift.
## CLI Bucket and Object Commands
`neon` also has first-class bucket/object commands (`neon bucket create|list|delete`, `neon bucket object put|get|list|delete`) for scripting and one-off operations.
## Built-in Branch Logs
```bash
neon logs query --branch production --source storage --since 1h
```
Storage is one of the two sources branch logs cover today, alongside Neon Functions. Logs are scoped to a single branch, so pass `--branch` when the bucket you're debugging isn't on the branch you're checked out on. Everything else about logs — the required CLI version, filters, the SDK, and the Loki-compatible read API — is in the parent `neon` skill's **Observability** section.
## Neon Documentation
The Neon documentation is the source of truth and Object Storage is evolving rapidly, so always verify against the official docs. Any doc page can be fetched as markdown by appending `.md` to the URL or by requesting `Accept: text/markdown`. Find the right page from the docs index (https://neon.com/docs/llms.txt) and the changelog announcements.
## Further Reading
- https://neon.com/docs/get-started/backend-overview.md
- https://neon.com/docs/storage/overview.md
- https://neon.com/docs/storage/get-started.md
- https://neon.com/docs/storage/buckets.md
- https://neon.com/docs/storage/objects.md
- https://neon.com/docs/storage/authentication.md
- https://neon.com/docs/storage/s3-compatibility.md
- https://neon.com/docs/storage/troubleshooting.md
- https://files-sdk.dev — Files SDK docs (the `neon` adapter)
don't have the plugin yet? install it then click "run inline in claude" again.
added explicit intent, inputs with external connections and SDKs, detailed 11-step procedure with code examples for both Files SDK and AWS S3 client, 8 decision points covering region/access/SDK/CDN/presign/CI/auth/errors, comprehensive output contract with success criteria and file locations, and outcome signal with step-by-step verification.
Neon Object Storage is S3-compatible file storage built into your Neon project that branches alongside your database. Use this skill when a user needs to store and serve files (uploads, attachments, avatars, images, documents, generated assets, backups) without standing up a separate provider like AWS S3 or Cloudflare R2. The core win: a preview branch gets its own copy of both the database rows and the files they reference at that point in time, via copy-on-write isolation. Branches with your database, one credential system, standard S3 tooling, and safe throwaway environments for dev/CI/preview work.
Prerequisites:
aws-us-east-2, aws-us-east-1, aws-eu-central-1, or aws-ap-southeast-1. Confirm region availability before proceeding (https://neon.com/docs/get-started/backend-overview.md).neon CLI installed (v2.0+) and authenticated. Install the parent neon skill first (https://neon.com/docs/ai/skills/neon/SKILL.md or neon skills -s neon -y).neon.ts infrastructure-as-code file at project root (see the neon skill for setup).External connections:
AWS_ENDPOINT_URL_S3 env var per branch).AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, all branch-scoped and injected via neon env pull or neon-env run.SDKs (choose one path below):
npm install files-sdk @aws-sdk/client-s3 @aws-sdk/s3-presigned-post @aws-sdk/s3-request-presignernpm install @aws-sdk/client-s3 @aws-sdk/s3-request-presignerOptional:
public_read buckets for caching hot assets.neon logs query --branch <branch> --source storageCheck region availability. Run neon projects and verify your project's region is in the supported list (aws-us-east-2, aws-us-east-1, aws-eu-central-1, aws-ap-southeast-1). If not, the user must create a new project in a supported region.
Declare buckets in neon.ts. Add a buckets block to your root neon.ts file, keyed by bucket name. Set access: "public_read" for buckets that allow anonymous reads; omit or set access: "private" (default) for credential-only buckets:
// neon.ts
import { defineConfig } from "@neon/config/v1";
export default defineConfig({
buckets: {
images: {}, // private
"public-assets": { access: "public_read" },
},
});
Provision buckets on the linked branch. Run neon deploy (alias for neon config apply) to create the declared buckets and inject their S3 credentials into .env.local:
neon deploy
Input: neon.ts with buckets block. Output: buckets created on the linked branch, S3 env vars written to .env.local.
Verify provisioning. Run neon config status to list the branch's live buckets. Run neon config plan to preview any changes before applying them:
neon config status
Input: none (queries linked branch). Output: list of bucket names and their access modes (private or public_read).
Pull or inject S3 credentials locally. If not already injected by neon deploy, pull the branch's credentials into .env.local or inject at runtime:
neon env pull # writes .env.local with AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ENDPOINT_URL_S3, AWS_REGION
# OR, without writing a file:
neon-env run -- <your dev command>
Input: linked branch. Output: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ENDPOINT_URL_S3, AWS_REGION available in process.env or .env.local.
Initialize an S3 client (choose one):
Option A: Files SDK (recommended). Simplest, most portable, unified API:
import { Files } from "files-sdk";
import { neon } from "files-sdk/neon";
const files = new Files({ adapter: neon({ bucket: "images" }) });
Input: bucket name. Output: files object with methods upload(), download(), url(), list(), exists(), copy(), delete(), signedUploadUrl().
Option B: AWS S3 client. Lower-level, native API, already a dependency:
import { S3Client } from "@aws-sdk/client-s3";
const s3 = new S3Client({
forcePathStyle: true, // required: Neon uses path-style addressing
});
Input: S3Client config with forcePathStyle: true. Output: s3 object ready for PutObjectCommand, GetObjectCommand, getSignedUrl, etc.
Upload a file. Use Files SDK or AWS S3 client:
Files SDK:
await files.upload("generated/cat.jpg", fileBuffer, { contentType: "image/jpeg" });
Input: key (path in bucket), body (Buffer, Uint8Array, Blob, File, ReadableStream, string), optional metadata. Output: object written to bucket.
AWS S3 client:
import { PutObjectCommand } from "@aws-sdk/client-s3";
await s3.send(new PutObjectCommand({
Bucket: "images",
Key: "generated/cat.jpg",
Body: fileBuffer,
ContentType: "image/jpeg",
}));
Input: PutObjectCommand with Bucket, Key, Body, ContentType. Output: object written to bucket.
Store the object key (not bytes) in Postgres. After upload succeeds, insert a row in Postgres that references the object key:
await db.query(
"INSERT INTO images (user_id, object_key) VALUES ($1, $2)",
[userId, "generated/cat.jpg"]
);
Input: user_id, object_key from step 7. Output: row written to Postgres on same branch.
Download or presign a file on read. Fetch the object_key from Postgres and either download directly or generate a presigned URL:
Files SDK presigned URL (recommended for sharing):
const url = await files.url("generated/cat.jpg", { expiresIn: 3600 });
Input: object key, optional expiresIn (seconds, defaults to 3600). Output: presigned URL with signature in query string, valid for 1 hour by default.
AWS S3 presigned URL:
import { GetObjectCommand } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
const url = await getSignedUrl(
s3,
new GetObjectCommand({ Bucket: "images", Key: "generated/cat.jpg" }),
{ expiresIn: 3600 }
);
Input: S3 client, GetObjectCommand with Bucket and Key, expiresIn. Output: presigned URL with SigV4 signature in query string.
Files SDK download:
const file = await files.download("generated/cat.jpg");
const bytes = new Uint8Array(await file.arrayBuffer());
Input: object key. Output: Uint8Array.
AWS S3 download:
import { GetObjectCommand } from "@aws-sdk/client-s3";
const res = await s3.send(new GetObjectCommand({ Bucket: "images", Key: "generated/cat.jpg" }));
const bytes = await res.Body?.transformToByteArray();
Input: S3 client, GetObjectCommand. Output: Uint8Array.
(Optional) Set up a CDN in front of public_read buckets for caching. For assets served on every page view (avatars, product images, etc.), use the branch's endpoint as the origin for Cloudflare or Vercel CDN:
Origin: https://<branch-id>.s3.<region>.neon.tech
When uploading, set Cache-Control headers (e.g., public, max-age=31536000, immutable for versioned assets; short max-age for HTML that keeps its name). Write each version to a new key and repoint the Postgres column rather than overwriting, so the CDN cache doesn't stale.
Input: public_read bucket endpoint, Cache-Control metadata on PutObject. Output: cached edge responses, reduced egress and latency.
(Optional) Query storage logs. Debug access, errors, or usage by branch:
neon logs query --branch production --source storage --since 1h
Input: branch name, optional time filter (--since 1h, --since 10m, etc.). Output: structured log entries from storage service.
Region check. If user's Neon project is not in aws-us-east-2, aws-us-east-1, aws-eu-central-1, or aws-ap-southeast-1, stop and tell them Neon Object Storage is not available in their region. They must create a new project in a supported region or wait for expansion.
Access mode decision. If files are user-generated or sensitive (avatars, documents, backups), use access: "private" (default) and always presign URLs or download with credentials. If files are public assets (product images, static pages), use access: "public_read" and optionally put a CDN in front for caching and egress reduction.
SDK choice. If user prefers simplicity, portability, and wants to swap storage providers later, use Files SDK. If user already depends on the AWS SDK or needs fine-grained control over S3 operations, use AWS S3 client.
Static hosting vs. CDN. If serving small pages or prototypes (Swagger UI, OAuth screens) directly from a public_read bucket, the endpoint at ${AWS_ENDPOINT_URL_S3}/<bucket>/<object-key> works but has no CDN, custom domains, or website mode (no index.html fallback, no SPA routing). Customers still set Cache-Control on upload and keep file names (e.g., app.3f9a1c.js for versioned assets) so caches can distinguish versions. For a full app frontend, recommend Vercel, Netlify, or Cloudflare Pages instead.
Presigned URL vs. public read. For private buckets, always presign URLs on read (step 9) and include the signature in the query string so the URL can be shared without exposing credentials. For public_read buckets, users can read directly at the endpoint without presigning, but presigned URLs still work if you want a short-lived expiry.
Branch strategy for CI/preview. When a neon.ts is present, neon checkout applies the bucket policy as it creates a branch, so a fresh preview branch is provisioned with its buckets and inherits copy-on-write copies of parent objects. Checking out an existing branch does not reconcile; run neon deploy to apply declared changes. For throwaway test branches, delete the branch when done to clean up storage.
Credential rotation / expiry. S3 credentials are injected per branch and are valid for that branch and all descendants. If a credential is compromised or expires, regenerate it via the Neon console or CLI and re-pull to .env.local with neon env pull. Credentials are not stored in the repo; they come from the branch environment.
Rate limits / network timeouts. Neon Object Storage does not document hard rate limits, but AWS S3 semantics apply (check https://neon.com/docs/storage/troubleshooting.md for any branch-specific throttling). If uploads or downloads time out, retry with exponential backoff. If a bucket is missing or credentials are invalid, the S3 client will raise a standard S3 error (NoSuchBucket, AccessDenied, etc.).
Empty result sets / missing objects. If download() or GetObjectCommand is called on a key that does not exist, the S3 client raises a NoSuchKey error (or Files SDK translates it to a Neon error). Always wrap reads in try-catch and handle the "not found" case.
Success criteria:
neon.ts under the buckets block and provisioned via neon deploy.neon config status lists the buckets with correct access modes (private or public_read).AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ENDPOINT_URL_S3, AWS_REGION (or in .env.local after neon env pull).forcePathStyle: true if using AWS client.PutObject succeeds, object key is returned and stored in Postgres.expiresIn duration (e.g., 3600 seconds).public_read object responses; Cache-Control headers respected.neon logs query --branch <branch> --source storage.File locations:
neon.ts at project root (modified to add buckets block)..env.local (or equivalent) contains AWS_* variables after neon env pull.https://<branch-id>.s3.<region>.neon.tech/<bucket>/<object-key>.neon config status and see the declared buckets listed with the correct access mode.neon env pull succeeds and writes AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ENDPOINT_URL_S3, AWS_REGION to .env.local (or the AWS SDK picks them up from the environment).files.upload() or s3.send(new PutObjectCommand(...)) without auth errors.files.url() or getSignedUrl(), and the URL works in a browser or HTTP client (GET returns the file with correct Content-Type and body).neon checkout -b preview and the branch is provisioned with its buckets; pulling its env vars shows a different AWS_ENDPOINT_URL_S3 endpoint for the preview branch.Cache-Control headers are set and a CDN is in front.neon logs query --branch production --source storage returns storage access logs.