> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dockiln.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Exporting to AWS S3

> Deliver generated files to a private Amazon S3 bucket using a workspace-scoped destination.

## Connect the bucket

1. Open the destination bucket in AWS and note its exact name and region. Enable S3 Block Public Access.
2. Create a dedicated IAM credential. Scope `s3:PutObject` and `s3:GetObject` to objects under the intended prefix and workspace ID. If using output expiration, also allow `s3:DeleteObject` there.
3. In DocKiln **Settings → Object storage delivery**, select Amazon S3. Enter the bucket, AWS region, access key ID and secret access key. For a prefix such as `exports/`, include the trailing slash. Save the configuration.

The signed-in configuration endpoint is [PUT /v1/storage](https://docs.dockiln.io/api-reference/configure-encrypted-s3-destination.md). DocKiln encrypts credentials at rest. Reading the setting returns destination metadata. Saving the setting validates its shape. Generating a file checks bucket access.

## Export a test PDF

Send this JSON to [POST /v1/documents](https://docs.dockiln.io/api-reference/queue-generation.md) with your workspace bearer key.

```json theme={null}
{
  "html": "<h1>Warehouse manifest</h1><p>Two cartons ready for dispatch.</p>",
  "delivery": "object"
}
```

Poll the returned job. On completion, check the bucket for an object at `exports/<workspace-id>/<job-id>.pdf` if you chose that prefix. A retry uses the job's same object key.

## Retrieve a private copy

Use the authenticated download path from the job, or request a [five-minute signed link](https://docs.dockiln.io/api-reference/sign-private-s3-download-for-five-minutes.md) for the recipient. Anyone holding the link can read the file during that window. If the job fails on delivery, check the exact region, key scope and any explicit deny in the bucket policy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.