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

# S3

> Pull files from an S3-compatible bucket so they can be re-archived to another destination, with optional incremental sync.

`type: s3` pulls files from an S3-compatible bucket so they can be re-archived to another destination. No external binaries are required — snapr uses the AWS SDK directly.

## Example

```yaml snapr.yaml theme={null}
sources:
  - type: s3
    bucket: my-app-uploads
    region: us-east-1
    accessKeyId: env:S3_KEY
    secretAccessKey: env:S3_SECRET
    path: production/
```

## Options

| Option                | Type      | Required | Default      | Description                                                                                                                                     |
| --------------------- | --------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`                | `s3`      | Yes      |              |                                                                                                                                                 |
| `bucket`              | string    | Yes      |              |                                                                                                                                                 |
| `region`              | string    | Yes      |              |                                                                                                                                                 |
| `accessKeyId`         | string    | Yes      |              | Use `env:`.                                                                                                                                     |
| `secretAccessKey`     | string    | Yes      |              | Use `env:`.                                                                                                                                     |
| `endpoint`            | string    | No       |              | Custom endpoint for non-AWS S3 (MinIO, Wasabi, and so on). Implies path-style addressing.                                                       |
| `usePathStyle`        | bool      | No       | `false`      | Force path-style addressing when `endpoint` is empty (rare).                                                                                    |
| `path`                | string    | No       | whole bucket | Object key prefix to download.                                                                                                                  |
| `excludes`            | string\[] | No       |              | Glob patterns matched against bucket-relative paths. Matching objects are skipped.                                                              |
| `syncPath`            | string    | No       |              | Local directory used as a persistent cache. When set, snapr keeps already-downloaded objects between runs and only fetches new or changed ones. |
| `extraParams.workers` | string    | No       | `10`         | Parallel download workers, max `50`.                                                                                                            |

## How it works

snapr lists the bucket (under `path` if set) and downloads the matching objects. Without `syncPath`, it uses a temporary directory that is cleaned up after the run. With `syncPath`, it reuses the directory across runs and skips objects whose size and modification time already match locally.

The downloaded tree is then compressed, encrypted, and uploaded to the configured [storages](/configuration/storages/overview). There is no direct bucket-to-bucket transfer — see [how remote sources are fetched](/configuration/sources/overview#how-remote-sources-are-fetched).

## Requirements

* The configured credentials need `s3:ListBucket` on the bucket and `s3:GetObject` on the keys (or the prefix selected by `path`).

## Notes

### MinIO with a persistent cache

```yaml snapr.yaml theme={null}
sources:
  - type: s3
    bucket: my-bucket
    region: us-east-1
    endpoint: https://minio.internal:9000
    accessKeyId: env:MINIO_KEY
    secretAccessKey: env:MINIO_SECRET
    syncPath: /var/cache/snapr/minio
```

## Related

* [Sources overview](/configuration/sources/overview)
* [S3 storage](/configuration/storages/s3) — use S3 as a backup destination
