---
title: Amazon S3
description: Archive SAP documents to Amazon S3 buckets with FileRelay. Supports path prefixes, auto-bucket creation, and S3-compatible endpoints.
type: s3
use_cases:
  - Long-term SAP document archive
  - Cost-effective storage with S3 Glacier lifecycle
  - Data lake integration for SAP documents
config_fields:
  - name: bucket
    type: string
    required: true
    desc: "S3 bucket name"
  - name: region
    type: string
    required: false
    desc: "AWS region (default: us-east-1)"
  - name: prefix
    type: string
    required: false
    desc: "Path prefix for stored objects"
  - name: endpoint
    type: string
    required: false
    desc: "Custom endpoint for S3-compatible services"
credential_fields:
  - name: access_key_id
    type: string
    required: true
    desc: "AWS Access Key ID"
  - name: secret_access_key
    type: string
    required: true
    desc: "AWS Secret Access Key"
---

Archive SAP documents to Amazon S3 buckets. Supports any S3-compatible storage, custom endpoints, path prefixes, and auto-creates buckets if needed.

## Setup

1. Create an S3 bucket in your AWS account (or let FileRelay create one automatically)
2. Create an IAM user with `s3:PutObject`, `s3:GetObject`, and `s3:ListBucket` permissions
3. In FileRelay, add an **Amazon S3** destination with the bucket name, region, and IAM credentials

## Path Structure

Documents are stored with the following key pattern:

```
{prefix}/{subfolder}/{doc_id}.{ext}
```

- **prefix** — configured base path (e.g. `sap-documents/`)
- **subfolder** — automatic subfolder based on routing rules (date, repository, or none)
- **doc_id** — the SAP document ID
- **ext** — file extension based on MIME type

## S3-Compatible Storage

This connector works with any S3-compatible service. Set the **endpoint** field:

| Service | Endpoint |
|---------|----------|
| AWS S3 | Leave empty (default) |
| MinIO | `https://minio.yourcompany.com:9000` |
| Wasabi | `https://s3.wasabisys.com` |

For dedicated R2 or GCS support with native auth, use the [Cloudflare R2](/docs/connectors/cloudflare-r2) or [Google Cloud Storage](/docs/connectors/google-cloud-storage) connectors instead.

## IAM Policy Example

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:PutObject", "s3:GetObject", "s3:ListBucket"],
      "Resource": [
        "arn:aws:s3:::your-bucket-name",
        "arn:aws:s3:::your-bucket-name/*"
      ]
    }
  ]
}
```
