Inline policies
Give a sub-user access to several buckets with one rule, kept in the sub-user's inline policy.
Every access rule you give a sub-user is one of two types:
- An inline policy rule lives in the sub-user's own policy, its inline policy. One rule can cover several of your buckets, each with its own scope.
- A bucket policy rule lives in one bucket's bucket policy and names the sub-user. It covers one bucket.
Each sub-user has one inline policy per region. It holds all of that sub-user's inline policy rules in that region. Inline policies work in both regions, Indore (idr01) and Mumbai (bom01).
Only you, the account owner, can add or change rules. A sub-user can read its own rules and its effective access.
Inline policy rule or bucket policy rule?
| Inline policy rule | Bucket policy rule | |
|---|---|---|
| Lives in | The sub-user's inline policy | One bucket's bucket policy |
| Buckets per rule | One or more (up to 64 in the inline policy) | Exactly one |
| Scope | Per bucket: the whole bucket or some folders | The whole bucket or some folders |
| Created from | The sub-user's page | The sub-user's page or the Policies page |
| Edited from | The sub-user's page | The sub-user's page or the Policies page |
| Best for | One sub-user that needs the same access to many buckets | Access to one bucket, or building a rule from single actions on the Policies page |
Both types offer the same permissions and block the same actions. You can change a rule from one type to the other later. See Change a rule's type.
How the two types combine
- Allows add up. A sub-user can do everything that any of its active rules allows, of either type.
- Any Deny wins. A Deny in either type blocks the action, whatever else allows it. An inline policy rule with Deny beats a bucket policy rule with Allow on the same bucket, and the other way round.
For example, an inline policy rule allows Read & Write on photos and reports. A bucket policy rule on reports has Block writes. The sub-user can read and upload in photos, and can only read in reports.
When a new rule and an existing rule with the other effect name the same bucket, the dialog shows a hint about which one wins.
Add an inline policy rule
In the sidebar, open Subusers and select the sub-user's name. Under Bucket Access Management, each of the sub-user's regions has its own list of rules.
In the region you want, select Add Access Rule.
Under Apply as, choose Inline policy (the default).
- Allow grants the permissions.
- Deny blocks them, whatever else allows them.
Under Buckets, pick one or more of your buckets in that region. Choose all adds every bucket that is not chosen yet. Select Done to close the list.
Each chosen bucket gets its own card. On each card, choose the scope:
- Entire bucket: the rule covers every file in that bucket.
- Folders: type a folder, for example
reports/orlogs/2026/. Select Add folder to add more. A trailing/is added for you.
Each bucket keeps its own scope. If a folder does not exist yet, Zata asks Create missing folders? when you save. Select Create folders to create them.
Under Permission, pick a preset. See Presets.
To pick single actions, select Customize permissions (or Custom permissions in the list). Tick actions by group, or use Search permissions. See Actions you can grant.
Select Add Inline Rule.
The rule appears in the region's list with an Inline badge, its effect, its buckets, its permission and its scope. The sub-user gets a notification.
The dialog has no fields for conditions. To add conditions, such as an IP address range, use Advanced: JSON.
Presets
| Preset | Effect | What it does | S3 actions |
|---|---|---|---|
| View & Download | Allow | Browse and download files. | ListBucket, GetObject, GetObjectVersion |
| Upload only | Allow | Add files without seeing the ones already there. | PutObject, AbortMultipartUpload |
| Read & Write | Allow | Browse, download and upload files. No deletes. | View & Download, plus ListBucketVersions, GetObjectTagging, PutObject, AbortMultipartUpload |
| Full access (objects) | Allow | Browse, download, upload and delete files, including versions. | Read & Write, plus GetObjectAcl, DeleteObject, DeleteObjectVersion, DeleteObjectTagging, GetBucketVersioning, GetBucketTagging |
| Block writes | Deny | No uploads, overwrites or deletes, whatever else allows them. | PutObject, DeleteObject, DeleteObjectVersion, AbortMultipartUpload, RestoreObject, DeleteObjectTagging, PutObjectRetention, PutObjectLegalHold |
| Block all access | Deny | No listing, reading, uploading or deleting, whatever else allows it. | Every action you can grant |
The Allow presets show when the effect is Allow. The Deny presets show when it is Deny.
Uploading a file with the same name as an existing file replaces it. Upload only and Read & Write can therefore overwrite files.
Actions you can grant
| Group | Actions |
|---|---|
| Read | List files (s3:ListBucket), Download files (s3:GetObject), Download file versions (s3:GetObjectVersion), List file versions (s3:ListBucketVersions), View file tags (s3:GetObjectTagging), View file permissions (s3:GetObjectAcl), List in-progress uploads (s3:ListBucketMultipartUploads), View upload parts (s3:ListMultipartUploadParts) |
| Write | Upload files (s3:PutObject), Cancel uploads (s3:AbortMultipartUpload), Restore archived files (s3:RestoreObject) |
| Delete | Delete files (s3:DeleteObject), Delete file versions (s3:DeleteObjectVersion), Remove file tags (s3:DeleteObjectTagging) |
| Bucket info | View bucket region (s3:GetBucketLocation), View versioning status (s3:GetBucketVersioning), View bucket tags (s3:GetBucketTagging) |
| Object lock | View retention lock (s3:GetObjectRetention), Set retention lock (s3:PutObjectRetention), View legal hold (s3:GetObjectLegalHold), Set legal hold (s3:PutObjectLegalHold) |
- View versioning status and View bucket tags apply to whole buckets only. A rule that includes them needs at least one bucket with Entire bucket.
- The Object lock group is collapsed. Retention and legal holds stop files from being deleted or overwritten until they end.
- On a bucket with Object Lock, a new or wider grant of Upload files, Set retention lock or Set legal hold needs Sub-users may use Object Lock turned on first. You find it in the bucket's settings, under Security & Access. On such a bucket, anyone who can upload can also lock files.
What can never be granted
These actions are refused in every rule, of either type:
| Actions | Why |
|---|---|
Any IAM action (iam:*) | Sub-users can never use the IAM API. |
| Create or delete buckets | Sub-users never create or delete buckets. |
ACL writes, and s3:GetBucketAcl | ACL writes could make files or buckets public with the sub-user's own key. |
| Every bucket settings write: bucket policy, lifecycle, versioning, CORS, tags, website, encryption, replication, notifications, logging, public access block, object lock configuration, request payment, ownership controls | Bucket settings belong to you. |
s3:BypassGovernanceRetention | It would defeat your Object Lock protection. |
s3:PutObjectTagging (Add/edit file tags) | Zata never gives this to sub-users. |
Wildcard actions such as s3:* and actions outside s3: are refused too.
Statements Zata always adds
Zata adds its own Deny statements to every sub-user's inline policy. You cannot edit or remove them. A Deny wins over any Allow, so they hold whatever your rules say:
| Statement | What it denies |
|---|---|
ZataPlatformDeny | Bucket governance, everywhere and always: bucket policy and bucket ACL changes, public access block, Object Lock configuration, creating or deleting buckets, IAM. |
ZataCap-tagging | Changing file tags, except where you delegated it. |
ZataCap-acl | Changing file ACLs, except where you delegated it. |
ZataCap-lock | Setting retention and legal holds, except on the buckets or folders where one of your rules grants Set retention lock or Set legal hold. |
ZataCap-public | Uploading files as public (with a public ACL or a grant header), except on buckets where Sub-users may publish files is on. |
In short: changing file ACLs or tags, retention and legal holds, and uploading files as public are denied except where you delegated them. A delegation you make with an S3 tool, in a bucket policy statement that names the sub-user, takes effect within 15 minutes.
You see these statements in Effective Access. Their Sids, and any Sid that starts with ZataCap-, are reserved: you cannot use them in your own statements.
Effective Access
On the sub-user's page, select Effective Access next to a region. It shows what applies to the sub-user in that region right now:
- every inline policy rule, active or suspended
- Zata's safety rules, with where each Deny is lifted and why
- every bucket policy statement that names the sub-user, including ones you wrote with an S3 tool (marked Not dashboard-managed)
- the JSON, as read from storage, with Copy JSON
Select Re-read to load it again.
Advanced: JSON
In the Add Access Rule dialog, with Apply as set to Inline policy, select Advanced: JSON. The editor shows every statement of the sub-user's inline policy in that region. You can change all of them at once, then select Save Policy. Back to the form returns to the dialog.
Paste a JSON array of statements, or a policy document with a Statement array. Each statement:
- may only have
Sid,Effect,Action,ResourceandCondition. NoPrincipal,NotActionorNotResource. - names only your own buckets in that region, one exact bucket name per resource. Folder paths after the bucket name are fine.
- uses only actions you can grant.
- has a
Sidof 1 to 100 characters (A-Z,a-z,0-9,_,-), unique in the inline policy.
Conditions can use these operators, each also with IfExists: StringEquals, StringNotEquals, StringLike, StringNotLike, IpAddress, NotIpAddress, Bool, the Date operators and the Numeric operators. The keys are aws:SourceIp, aws:SecureTransport, aws:CurrentTime, aws:EpochTime, aws:Referer, aws:UserAgent, s3:prefix, s3:delimiter and s3:max-keys. A condition value can be up to 1,024 characters.
A statement you write in JSON shows as Custom statement in the list.
Zata adds some statements for rules you build in the form. You may see them in the JSON:
- A rule with folders gets a companion statement with a Sid ending in
-list, so the sub-user can list inside those folders. - An Allow with Delete files on folders gets a statement with a Sid ending in
-bulkdelete. Each file is still checked against the folders. - An Allow with List file versions on a whole bucket also gets View versioning status.
Manage rules
Each rule in a region's list has these buttons:
| Button | What it does |
|---|---|
| Edit rule | Change the effect, buckets, scopes or permissions, then Save Rule. |
| Suspend rule | Remove the access for now. The rule is kept. |
| Resume rule | Check the rule again and turn it back on. |
| Delete rule | Remove the rule for good (Revoke Access). |
More (…) | Change the rule's type. |
The sub-user gets a notification when a rule is added, changed, suspended, resumed or deleted.
On the Policies page, inline policy rules appear with an Inline badge. To change one, select Manage on the subuser page.
Change a rule's type
Open More (…) on a rule:
- Change to bucket policy turns a one-bucket inline policy rule into a bucket policy rule.
- Split into bucket-policy rules turns an inline policy rule that covers several buckets into one bucket policy rule per bucket.
- Change to inline policy turns a bucket policy rule into an inline policy rule.
Confirm with Change type (or Split into … bucket-policy rules). The change is one operation: if any step fails, it is undone and nothing changes. The sub-user keeps the same access, and a suspended rule stays suspended. Pending policy requests on the rule follow it. A request that no longer applies is cancelled, and the sub-user is told.
A Custom statement cannot change type.
Who has access to a bucket
In the bucket's settings, the Who has access card lists every sub-user whose rules name that bucket, of both types. For each rule you see the sub-user, Type, Effect, Permissions, Scope and Status. To open the settings, go to Buckets and select the gear icon (Bucket Settings) in the bucket's row.
To take every sub-user off the bucket at once, select Remove all Subusers' access, type the bucket name and select Remove all access:
- Every bucket policy rule of a sub-user on this bucket is deleted.
- Every inline policy rule that names this bucket loses it. A rule that names only this bucket is deleted.
Limits
| Limit | Value |
|---|---|
| Statements per inline policy | 64 |
| Buckets per inline policy | 64 |
| Resources (bucket or folder paths) per statement | 64 |
| Actions per statement | 64 |
| Size of your statements in one inline policy | 32 KiB |
A rule with folders can use several statements. A rule that does not fit, alone or with the sub-user's other rules, is refused as a whole. Use fewer buckets or folders, split it into several rules, or add it as bucket policy rules.
When a bucket is deleted or changes owner
- Deleted in the dashboard. Zata first removes the bucket from every sub-user's inline policy rules. A rule that names only that bucket is deleted. The delete dialog lists the sub-users with inline access, and they are notified. If the removal fails, the bucket is not deleted.
- Deleted with an S3 tool. Zata removes the bucket from inline policy rules, usually within about a minute.
- No longer yours. If a rule names a bucket that no longer exists or is owned by another account, Zata drops that bucket from the rule.
- Removed sub-user. Deleting a sub-user, or removing it from a region, removes its inline policy there.
Errors
| Code | What it means | What to do |
|---|---|---|
RESOURCE_NOT_ALLOWED | A bucket in the rule is not yours, or does not exist, in that region. | Pick your own buckets in that region. |
LOG_BUCKET_CANNOT_BE_SHARED | The bucket receives access logs, so it cannot be shared with a sub-user. | Turn off or move the logging first. |
OBJECT_LOCK_OPT_IN_REQUIRED | The bucket uses Object Lock, and the rule grants upload, retention or legal hold. | Turn on Sub-users may use Object Lock in the bucket's settings, then save again. |
INLINE_POLICY_INVALID | A statement breaks a rule on this page. The first problem is in error, all of them in errors. | Fix the statements listed. |
EFFECT_INVALID, BUCKETS_EMPTY, BUCKET_DUPLICATE, SCOPE_INVALID, RESOURCE_EMPTY, STATEMENT_KEY_NOT_ALLOWED, ACTION_EMPTY, ACTION_NOT_ALLOWED, PREFIX_SCOPE_ACTION_FORBIDDEN, CONDITION_INVALID, CONDITION_OPERATOR_NOT_ALLOWED, CONDITION_KEY_NOT_ALLOWED, CONDITION_VALUE_INVALID, SID_INVALID, SID_RESERVED, SID_DUPLICATE | One field of the rule is wrong. The message says which. | Fix that field. |
INLINE_RULE_TOO_LARGE, TOO_MANY_STATEMENTS, TOO_MANY_BUCKETS, TOO_MANY_RESOURCES, TOO_MANY_ACTIONS, DOCUMENT_TOO_LARGE | Over a limit. | Use fewer buckets or folders, split the rule, or use bucket policy rules. |
BASELINE_TOO_LARGE | The sub-user's permissions would be too large to store. Nothing was changed. | Use fewer, broader rules, such as whole buckets instead of many folders. |
INLINE_POLICY_STALE | The inline policy changed elsewhere since you loaded it. | Reload and try again. |
INLINE_POLICY_LOCK_LOST | Another change landed while this one was saved. Nothing was recorded. | Reload and try again. |
INLINE_RULE_NOT_FOUND | No rule with that ID. | Reload the list. |
INLINE_RULE_MULTI_BUCKET | The inline policy rule covers several buckets, and a bucket policy rule covers one. | Use Split into bucket-policy rules, or keep it inline. |
INLINE_RULE_NOT_CONVERTIBLE | A custom JSON statement cannot become a bucket policy rule. | Keep it inline, or delete it and add a bucket policy rule. |
INLINE_POLICY_ADMIN_NOT_CONFIGURED | Inline policy rules cannot be saved in this region right now. | Try again later, or add a bucket policy rule. |
INLINE_POLICY_CLEANUP_FAILED | A bucket could not be deleted because its inline policy rules on it could not be removed. | Try again later. |
INLINE_POLICY_OWNER_CHECK_FAILED, INLINE_POLICY_LOCK_UNAVAILABLE, INLINE_POLICY_OUT_OF_SYNC | A temporary problem. Nothing was changed. | Try again in a moment. |
INLINE_POLICY_VERIFY_FAILED, INLINE_POLICY_RGW_ERROR | Storage did not keep or answer the change. | Reload, check the rules and try again. |
Use the API
To manage inline policy rules from scripts, see Inline policies in the Sub-user API.