Rotate an S3 access key without interruption
Create and enable a separate S3-capable API key, save its one-time secret, migrate and test every client, then revoke the retired key safely.
Last reviewed
An S3 credential belongs to one Dosya API key and cannot be regenerated in place. The safe rotation sequence creates another API key, enables a new S3 pair, proves it, migrates clients, and only then revokes the old row.

Before you start
Inventory every use of the old access key ID. Record the parent key’s scope, S3 surface, workspace or folder anchor, IP ranges, active hours, expiry, and any usage limits. Duplicate settings copies visible restrictions, but usage limits start blank and expiry resets to Never expires.
The new 40-character S3 secret is shown only once. Store it in the client’s secret manager rather than a command line, screenshot, or ticket.
Steps
- Open Profile > API keys, expand the old key, and choose Duplicate settings.
- Give the new key a rotation-specific name, restore any required usage limit and expiry, keep S3 gateway enabled, and choose Generate key.
- Expand the new row, select Enable, and save the new Access key ID, Secret access key, endpoint, and region from S3 credentials.
- Configure one test client with the new pair and verify an operation allowed by its scope against the intended workspace or prefix.
- Replace the old pair in every production client, restart or reload each client as needed, and confirm successful requests use the new key.
- On the retired API-key row choose Revoke and confirm the irreversible dialog, then verify with harmless requests that the old S3 ID is refused with InvalidAccessKeyId, allowing for the cache window described below.

Expected result
New requests authenticate with the replacement pair. Deleting the old API key initiates invalidation of both its normal API-key cache and linked S3 credential cache, but another worker isolate or edge cache can briefly retain authorization beyond the UI confirmation. The API-key cache TTL is five minutes. Keep using the tested replacement and send harmless requests with the retired pair until it is refused. There is no downtime when the overlap is kept until testing finishes.
If a new S3 pair cannot be enabled, verify that the replacement includes S3, has not expired, and is pinned to a workspace where the user’s role allows S3. S3 credentials already exist for this API key. Delete and recreate to regenerate. confirms that in-place secret rotation is unsupported.
Related guides
Was this helpful?
Loading helpfulness results…
Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.
Questions and replies
Ask about the steps in this guide. Questions are reviewed before publication.
Keep account details, credentials and private files out of public questions. Use private support for those.
Loading questions…
Sign in to your Dosya account to ask a question.