disk exec, anything else).
The Archil console walks you through this when you create a disk in the UI. This page documents what the console is doing, for setting things up by hand or scripting it.
Amazon S3
Amazon S3 supports two ways to authorize Archil:- Bucket resource policy — recommended. Archil’s IAM role assumes access to your bucket via a resource policy you attach to the bucket. No long-lived credentials change hands.
- Static IAM credentials — paste an access key and secret key from an IAM user that has read/write access to the bucket. Simpler to set up, but you’re responsible for rotating the credentials.
Bucket resource policy
In the AWS S3 console, select your bucket, open the Permissions tab, and edit the Bucket policy. Add the following statement, substitutingYOUR-BUCKET-NAME and your disk’s session ID for YOUR-DISK-SESSION-ID (shown in the Archil console, e.g. asi_us-east-1_tl02r28ami6phda70d1pv):
archilSessionId condition scopes the grant to a single Archil disk, so the bucket is only reachable by that one disk — every other disk in your organization is denied. This is the right default if you point one disk at the bucket.
The action list above is the minimum Archil needs: s3:ListBucket for bucket existence checks and listings, s3:GetObject for reads, s3:PutObject for writes (including multipart uploads), and s3:DeleteObject for object removal.
Archil doesn’t call
AbortMultipartUpload directly, so it’s not required in the policy. However, on rare failure paths a multipart upload can be left incomplete, and the parts continue to incur storage cost until they’re cleaned up. We recommend either adding s3:AbortMultipartUpload to the action list, or attaching an S3 lifecycle rule that aborts incomplete multipart uploads after a few days.Principal ARN varies by Archil region — the Archil console displays the precise policy to paste, including the right principal for your region.
Authorizing every disk in your organization
If you point many disks at the same bucket — for example, one disk per tenant or per workspace — swap the condition to match onarchilAccountId instead. That’s your Archil organization ID (shown in the Archil console, e.g. org_3CjfHc6i0vXj24vu0Wpl8twU3nk) and it’s the same for every disk you create:
Server-side encryption with KMS (SSE-KMS)
If your bucket is encrypted with SSE-S3 (the defaultAES256 option), nothing extra is needed — the bucket policy above is sufficient.
If your bucket is encrypted with SSE-KMS using a customer-managed KMS key, you also need to grant Archil’s IAM role permission to use that key. Open the key in the AWS KMS console (the key’s ARN is shown at the top of its detail page), edit the Key policy, and add the following statement — substituting YOUR-KMS-KEY-ARN:
kms:Decrypt lets Archil read objects, kms:GenerateDataKey lets it write new objects under envelope encryption, and kms:DescribeKey is occasionally used during client setup.
SSE-KMS with the AWS-managed
aws/s3 key does not work for cross-account access. AWS-managed keys can’t be shared outside the account that owns them, so a bucket encrypted with aws/s3 is unreachable from Archil’s role. To use SSE-KMS with Archil, the bucket must use a customer-managed KMS key.ServerSideEncryption headers on its requests, so whatever default encryption you configure on the bucket is what objects land with. You don’t need to tell Archil which key you’re using.
Static credentials
If you’d rather not edit the bucket policy, create an IAM user withs3:* permissions on the bucket and pass its access key ID and secret to Archil when you create the disk:
Google Cloud Storage
Google Cloud Storage authorizes Archil through static AWS-compatible HMAC credentials.- Open the Google Cloud Storage console.
- Click Settings, then Interoperability.
- Under Service account HMAC, click Create a key for another service account.
- Grant the Cloud Storage → Storage Object Admin role to the new service account.
- Record the Access key and Secret for the new service account HMAC key.
Cloudflare R2
Cloudflare R2 authorizes Archil through static AWS-compatible credentials.- Open the Cloudflare console.
- Browse to R2 and click Manage R2 API Tokens.
- Create a new token with Object Read & Write permissions.
- Record the Access Key ID, Secret Access Key, and the default endpoint (looks like
https://<account>.r2.cloudflarestorage.com).
Generic S3-compatible storage
Many providers expose S3-compatible APIs and work with Archil out of the box. To configure one:- Get the S3-compatible API endpoint from your provider.
- Create or obtain access credentials (Access Key ID and Secret Access Key) with read/write/list/delete permissions on the bucket.
- When creating your disk, select Generic S3 Compatible as the data source type and provide the endpoint plus credentials.
- MinIO
- DigitalOcean Spaces
- Wasabi
- Backblaze B2 (with S3-compatible API)
- And many others