Bucket policies overview
Bucket policies in e3 Object Storage — overview and links to policy examples.
Bucket policies are JSON documents attached to a bucket that Allow or Deny actions for principals (users, accounts, or *).
e3 Object Storage uses the S3 policy model (Version: 2012-10-17).
Policy structure
Each Statement includes:
Effect —
AlloworDeny(DenyoverridesAllow)Principal — who the rule applies to
Action — S3 operations (e.g.
s3:PutObject,s3:GetObject)Resource — bucket ARN or object ARN (
arn:aws:s3:::bucketorarn:aws:s3:::bucket/*)Condition — optional (IP address, prefix, etc.)
Account ID and username
Find Account ID and Username on Access Keys or Users. Principal ARN format:
arn:aws:iam::ACCOUNT_ID:user/USERNAME
Example guides
Deny uploads for a specific user
Basic bucket policy
Allow only certain file extensions
File extension policy
Restrict access by IP
IP restriction policy
Apply a policy (AWS CLI)
Replace YOUR_BUCKET and ensure policy.json is valid JSON. See AWS CLI and s3cmd.