S3 access keys
DanubeData access keys are S3-compatible credentials your applications use to connect to your buckets. This guide explains the three kinds of key — team-wide, per-bucket, and a key with no access of its own — and how to create, rotate, and revoke them.
Overview
Every S3 request to DanubeData is authenticated by an access key ID and a secret access key. Access keys belong to a team and inherit that team's bucket ownership.
There are three scope types:
- Team-wide (All buckets in the console) — Full access to every bucket the team owns. This is the default and matches the behavior of existing keys.
- Specific buckets (Chosen buckets in the console) — Restricted to a chosen list of buckets, with an independent permission level per bucket.
- No access of its own (
none; By bucket policy in the console) — Reaches nothing by itself, only what a bucket policy allows it: name the key's ARN as the principal of a statement, or let the bucket's policy editor write the statements for a key and a folder. You create such a key in the console, with the CLI, or through the API. See Keys with no access of their own.
Scoped keys are enforced at the storage backend itself via bucket policies — not just inside the dashboard. The restriction holds even when the key is used outside our tools.
Team-wide vs scoped keys
| Property | Team-wide | Specific buckets |
|---|---|---|
| Buckets reachable | All current and future buckets owned by the team | Only the buckets explicitly granted |
| Permission model | Full read/write/delete on all buckets | Chosen per bucket (read-only, read-write, or full) |
aws s3 ls (no bucket) | Lists all team buckets | Returns empty (see Known behavior) |
| Recommended for | Admins, backup tooling, shared CI runners | Application credentials, per-environment isolation, third-party integrations |
If a key with a leaked secret is restricted to a single bucket, only that bucket is exposed — the rest of your storage remains isolated.
Permission levels
When you create a scoped key you pick a level for each bucket:
| Level | Includes | Typical use |
|---|---|---|
| Read-only | GetObject, ListBucket, HeadObject, GetObjectVersion, GetBucketLocation | Analytics readers, CDN origins, backup verifiers |
| Read-write | All read-only actions plus PutObject, AbortMultipartUpload, ListMultipartUploadParts, ListBucketMultipartUploads | Application uploads, sync jobs, image processors |
| Full | All read-write actions plus DeleteObject, DeleteObjectVersion, GetBucketVersioning, PutBucketCors, PutBucketLifecycle, PutBucketVersioning | Bucket maintenance, migrations, lifecycle automation |
Different buckets attached to the same key can have different levels — for example, read-only on analytics-prod and full on analytics-staging.
Creating an access key
From the Security page (any scope)
- Open Account → Security → S3 credentials.
- Click Create access key.
- Enter a name (up to 32 characters).
- Under Access, choose the kind of key:
- All buckets — Full access to every bucket in the team, for admins and shared tooling. Skip to step 5.
- Chosen buckets — Only the buckets you pick, each at the level you set. Add one row per bucket: pick the bucket and a level (Read only, Read and write, or Full access). You can add up to 50 buckets per key.
- By bucket policy — No access of its own: the key reaches only what a bucket's policy allows, down to a folder. Skip to step 5, then see Keys with no access of their own.
- Click Create access key, then confirm it's you when asked.
- Copy the secret immediately. The secret is shown once at creation time and cannot be retrieved later. The console shows only part of the access key ID afterwards, so copy or download the credentials now. The same view shows the endpoint and region and, for a key with a storage user of its own (Chosen buckets or By bucket policy), the key's ARN with a copy button.
The console's create form has no expiry field. To make a key expire, set expires_at when you create it through the API or in the Terraform resource danubedata_storage_access_key, or pass --expires to danube storage keys create in the CLI. A key is revoked automatically after its expiry date, within five minutes of that date. Revoking it ends all of its access, whether it is an All buckets key, a Chosen buckets key or a By bucket policy key, and the statements of a bucket policy that name it grant nothing any more. If the storage backend cannot be reached when the date passes, the platform tries again every minute until the key is removed; until then the key is marked as expired on its bucket's Access tab and in the bucket policy. Revocation is permanent, so an expired key is replaced by creating a new one.
From a bucket's Access tab
- Open the bucket and go to its Access tab.
- In the Access keys for this bucket card, click Create a key for this bucket.
- Enter a name. The drawer opens on Chosen buckets with this bucket already picked at Read and write. Change the level, add more buckets, or choose All buckets or By bucket policy instead.
- Click Create access key, confirm it's you when asked, and copy the secret immediately.
An access key reaches your data without a password, so we email you whenever one is created, and whenever a key is changed to reach more buckets, a higher level or a later expiry. Changing a key's reach also asks you to confirm it's you.
Every active key of your team, however you created it, is also listed under Account → Security → S3 credentials.
From the CLI
With CLI 1.7.0 or later, danube storage keys create makes all three kinds of key: --scope team, --scope buckets with a --bucket <bucket>:<level> for each bucket, and --scope none. See CLI: Object Storage for the flags, and Bucket policies from the CLI to give a key with no access of its own a folder.
Keys with no access of their own
A key created as By bucket policy (scope none) can do nothing until a bucket's policy allows it. Use it when parts of your system, such as the modules of one application, share a bucket but each should reach only its own folder: you create one key per module and give each key its folder. A team can have up to 100 buckets, so a bucket for every module is not always possible.
- Create the key. Under Access, choose By bucket policy, as described in Creating an access key.
- Open the bucket's policy. Open the bucket, go to its Access tab and click Edit policy in the Bucket policy card.
- Give the key a folder. In the form Give a key access to a folder, choose the key under Access key, enter the Folder and choose an Access level (Read only, Read and write, or Full access), then click Add to policy. Repeat for each key and folder, then click Save policy and confirm it's you when asked. Saving a policy emails you when what you saved changed it, as a policy can give a key access.
The key can then use that folder at the level you chose, and list it. Anything outside the folder stays out of reach unless a statement in the policy allows it. The bucket's Access keys for this bucket card lists the key with By policy, and the key's drawer lists the bucket under Bucket policies.
A policy names a key by its ARN, so a key that replaces another (see Rotating a key) has to be given the folders again: add it with the form, then remove the old key's statements.
A key limited to a folder cannot list the bucket's root, so point an S3 client at the folder, for example s3://my-bucket/invoices/. A key that reaches a bucket only through its policy cannot back that bucket's SFTP user. See Bucket policies for the statements the form writes, the rules for folder names and the other limits.
Listing and inspecting keys
The Security → S3 credentials list shows, for each key:
- Name
- Access key ID (shown in part; the secret is never displayed again)
- Access — All buckets, 1 bucket or N buckets (for example 3 buckets), or By bucket policy
- Created
On a bucket's Access tab, the Access keys for this bucket card lists the keys that reach that bucket, with their name, access key ID, Access and last use. For a key chosen for the bucket, Access is the level given for this bucket; for a key that only the bucket's policy allows, it says By policy. Keys created for All buckets reach every bucket, so they are listed under Security only.
Click a key, in either list, and its drawer opens. It shows the Access key ID (in part), the key's ARN or, for a key that signs as your team, Identity: The team, then Access, Created and Last used. For a key limited to chosen buckets, it also lists those buckets with the level for each. For a key with a storage user of its own, a Bucket policies section lists the buckets whose bucket policy allows the key, each linking to that bucket's Access tab.
A key you create for chosen buckets or by bucket policy gets a storage user of its own, and the drawer shows that user's ARN, for example arn:aws:iam:::user/team-42-sk-k3j9x2mq, with a copy button. The Save your credentials view you get when you create the key shows the same ARN and button. Name the ARN as the principal of a bucket policy statement when the statement should apply to that key alone; the form Give a key access to a folder does it for you. A key without an ARN signs as your team, an identity all such keys share, and its drawer says so.
Rotating a key
DanubeData supports the standard two-key rotation pattern. Scope is immutable on an existing key, so to rotate:
- Create a new key with the same scope and the same per-bucket levels as the existing key.
- Deploy the new credentials to your applications.
- Confirm traffic — Watch the new key's last-used timestamp climb while the old key's stays still.
- Revoke the old key.
There is no "rotate in place" operation — this is deliberate so you control the cutover window.
Revoking a key
- Open Security → S3 credentials, or the Access keys for this bucket card on the bucket's Access tab.
- Click the key you want to disable, then click Delete in its drawer. This revokes the key.
- Confirm the prompt.
Revocation invalidates the credentials at the storage backend immediately. For keys chosen for specific buckets, the bucket policy is rebuilt without that key's principal, so access stops within seconds. A revoked key leaves the list and cannot be reactivated; the API still lists it, with its status.
Statements that a bucket policy holds for a revoked key stay in the policy. They grant nothing, and the bucket policy editor marks them Revoked key; remove them when you no longer need them.
Changing the buckets a scoped key can access
You can edit a scoped key's per-bucket permissions at any time:
- Add a new bucket to the key (pick a level)
- Change the level on an existing bucket
- Remove a bucket from the key
These changes apply within seconds — the backend bucket policy is rebuilt and pushed to the storage layer automatically.
You cannot change a key's scope type after creation (for example, you cannot convert a team-wide key into a scoped key, or vice versa). If you need a different scope type, create a new key and revoke the old one.
Using your key with the S3 API
Use the access key ID and secret as standard S3 credentials, pointing at the DanubeData endpoint.
Environment variables
export AWS_ACCESS_KEY_ID="YOUR_ACCESS_KEY_ID"
export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_ACCESS_KEY"
export AWS_ENDPOINT_URL="https://s3.danubedata.ro"
export AWS_REGION="fsn1"
aws CLI example
# Upload an object to a bucket the key has access to
aws --endpoint-url https://s3.danubedata.ro s3 cp report.pdf s3://my-bucket/
# List objects in a bucket
aws --endpoint-url https://s3.danubedata.ro s3 ls s3://my-bucket/
Python (boto3) example
import boto3
s3 = boto3.client(
's3',
endpoint_url='https://s3.danubedata.ro',
aws_access_key_id='YOUR_ACCESS_KEY_ID',
aws_secret_access_key='YOUR_SECRET_ACCESS_KEY',
region_name='fsn1',
)
s3.put_object(Bucket='my-bucket', Key='hello.txt', Body=b'hello')
Known behavior: aws s3 ls and scoped keys
aws s3 ls (without a bucket name) calls the S3 ListAllMyBuckets operation, which only returns buckets owned by the requesting credentials. Scoped keys don't own any buckets — they're granted access through bucket policies — so aws s3 ls returns an empty list.
To list objects in a bucket the scoped key can access, include the bucket name:
aws --endpoint-url https://s3.danubedata.ro s3 ls s3://your-bucket-name/
This calls ListBucket, which the bucket policy grants for all three levels. Team-wide keys do see the full bucket list with aws s3 ls.
Best practices
- Use least privilege — Prefer scoped keys with the lowest level that works (read-only over read-write, read-write over full).
- One key per application — Don't share keys across services; this makes rotation safer and audit easier.
- Rotate periodically — Use the two-key rotation pattern at a cadence that fits your compliance needs.
- Set expiry dates — For temporary integrations, create the key through the API, the CLI or Terraform with an expiry date, so that it is revoked automatically within five minutes of that date.
- Never commit secrets — Inject credentials via environment variables, mounted files, or a secrets manager.
- Monitor last-used timestamps — Keys that haven't been used in a long time are good candidates for cleanup.
- Separate buckets by sensitivity — A scoped key on a sensitive bucket can't be misused to read unrelated data.
Troubleshooting
"Access Denied" on a scoped key
- Confirm the bucket is in the key's scope — Open the key in Security → S3 credentials. A key limited to chosen buckets lists them in its drawer, each with its level. For a By bucket policy key, the Bucket policies section of the drawer lists the buckets whose policy allows it: if the bucket is not there, no statement in its policy names the key.
- Check the level — A read-only level can't perform
PutObject; a read-write level can't performDeleteObject. Bump the level or use a different key. - Check the folder — A folder grant covers the objects under that folder, and listing that folder, and nothing else. An object outside the folder, or a listing of the bucket's root, is refused: point the client at the folder, for example
aws --endpoint-url https://s3.danubedata.ro s3 ls s3://my-bucket/invoices/. - Check key status — Revoked and Error keys reject requests, and Active is the only working status. A key whose expiry date has passed is revoked automatically within five minutes of that date, whichever kind of key it is. From then on it rejects every request, it is no longer in the list, and a bucket policy marks its statements Revoked key. Create a new key to replace it.
- Wait a few seconds after editing — Bucket policy changes are reconciled in the backend; brief propagation can take a few seconds after an edit.
aws s3 ls returns an empty list
Expected behavior for scoped keys. See Known behavior above. Use aws s3 ls s3://bucket-name/ with the bucket name to list objects.
Status is "Error" in the dashboard
The key's bucket policy could not be applied at the backend. This is usually transient and resolves on the next reconcile sweep (runs hourly). If the status persists, contact support with the access key ID.
Next steps
- Object Storage security — Encryption, public access, CORS, presigned URLs
- Object Storage quick start — Create your first bucket
- S3 API supported actions — Full list of supported S3 operations
Questions? Contact support at support@danubedata.ro