# S3-compatible storage access
Source: https://sovaria.in/docs/storage-s3

Use the AWS CLI, boto3, rclone, Cyberduck or any S3 SDK with your project's buckets: create an access key, point the client at your endpoint and use region auto.

Every project's storage also speaks the S3 protocol. Objects written over S3 are the same objects you see in the console and the storage API: they count towards the same limits and show up in the audit log.

(Diagram: Two ways into the same buckets)

## Create an access key

1. **Open Storage → S3 connection** — Owners and admins can create keys. The page also shows your endpoint.
2. **Create a key and copy the secret** — The secret is shown once and stored encrypted. Put it in your secret manager.
3. **Configure your client** — Path-style addressing, the endpoint from the page, region `auto`.

> **Warning:** S3 access keys have full access to the project's buckets and **bypass storage rules**, like a service key. Use them on servers and tools only — never in a browser or app. Revoking a key stops it immediately.

## Client setup

AWS CLI:
```bash
export AWS_ACCESS_KEY_ID=<access-key-id>
export AWS_SECRET_ACCESS_KEY=<secret>

aws s3 ls --endpoint-url https://<project-ref>.sovarias.in/storage/v1/s3 --region auto
aws s3 cp ./backup.tar.gz s3://backups/2026-10-16.tar.gz \
  --endpoint-url https://<project-ref>.sovarias.in/storage/v1/s3 --region auto
```

Python (boto3):
```python
import boto3

s3 = boto3.client(
    "s3",
    endpoint_url="https://<project-ref>.sovarias.in/storage/v1/s3",
    region_name="auto",
    aws_access_key_id=KEY_ID,
    aws_secret_access_key=SECRET,
)
s3.upload_file("photo.jpg", "avatars", "users/42.jpg")
url = s3.generate_presigned_url("get_object", Params={"Bucket": "avatars", "Key": "users/42.jpg"}, ExpiresIn=3600)
```

rclone:
```bash
rclone config create sovaria s3 provider=Other \
  endpoint=https://<project-ref>.sovarias.in/storage/v1/s3 region=auto \
  access_key_id=<access-key-id> secret_access_key=<secret>
rclone sync ./public sovaria:assets
```

## What is supported

- Buckets: list, create, delete.
- Objects: list (v1 and v2, prefixes and delimiters), get (with ranges), head, put, copy, delete, batch delete.
- Multipart uploads and presigned URLs.

S3 access is included on every plan; storage size, file size and egress follow your plan — see [Plan limits](https://sovaria.in/docs/plan-limits).
