Least privilege for Amazon S3 is a prefix-scoped grant with ACLs off and public access blocked
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
AWS documentation read on 16 Nov 2026 says new S3 buckets disable ACLs by default, so access rests on identity policies, bucket policies, VPC endpoint policies, SCPs and RCPs. This guide shows a prefix-scoped grant, the wildcards AWS tells you to hunt for, and the checks for what is used.
Open the calculator ยท All services
S3 access rests on policies once ACLs are disabled
AWS documentation says S3 Object Ownership defaults to the bucket owner enforced setting, which disables all access control lists (ACLs). When ACLs are off, access control is based on policies: IAM user policies, S3 bucket policies, VPC endpoint policies, AWS Organizations service control policies (SCPs) and resource control policies (RCPs).
The same page recommends granting only the permissions required for a task and says least privilege reduces the impact of errors or malicious intent. It also recommends IAM roles with temporary credentials over long-term credentials stored in an application or on an EC2 instance.
The identities that call this service (people, services, workloads, third parties) are covered in the AWS service identities guide and the workload identities guide.
Wildcard principals, wildcard actions and ACL grants are the patterns to remove
AWS documentation tells you to look for four patterns, and gives its reason for each.
- A bucket policy with "Principal": "*", which effectively means anyone.
- A bucket policy with a wildcard action "*", which effectively allows every action on the bucket.
- Bucket ACLs that give read, write or full access to "Everyone" or "Any authenticated AWS user".
- SSE-C encryption left enabled when no workload needs it: AWS says it makes access impractical to share with other users, roles or services, and since April 2026 it is disabled by default on new general purpose buckets.
A home-folder grant limits one user to one prefix
AWS publishes an example bucket policy that confines a user named JohnDoe to the home/JohnDoe/ prefix. The example grants s3:* on the prefix; a task that only reads and writes objects can name those object actions instead.
| Statement | Action | Resource | Condition |
|---|---|---|---|
| AllowRootAndHomeListingOfCompanyBucket | s3:ListBucket | arn:aws:s3:::amzn-s3-demo-bucket | s3:prefix is "", "home/" or "home/JohnDoe"; s3:delimiter is "/" |
| AllowListingOfUserFolder | s3:ListBucket | arn:aws:s3:::amzn-s3-demo-bucket | s3:prefix matches home/JohnDoe/* |
| AllowAllS3ActionsInUserFolder | s3:* (in the AWS example) | arn:aws:s3:::amzn-s3-demo-bucket/home/JohnDoe/* | none |
Bucket-level controls narrow access beyond identity policies
- S3 Block Public Access applies centralized limits regardless of how a resource was created, and AWS says an organization-level policy can apply it to all member accounts or selected OUs.
- A Deny statement with the aws:PrincipalOrgID condition key keeps access inside an AWS Organization; AWS calls this stronger than an Allow with the same key.
- A Deny with aws:SecureTransport set to "false" rejects requests sent over HTTP.
- The s3:x-amz-acl condition key requires uploads to carry the bucket-owner-full-control ACL.
Check use with Access Analyzer, CloudTrail data events and the 403 message
IAM Access Analyzer for S3 reports buckets open to the internet or to other AWS accounts, and AWS says the external access summary refreshes once every 24 hours. AWS Config managed rules s3-bucket-public-read-prohibited and s3-bucket-public-write-prohibited give ongoing detection.
Object-level activity such as GetObject, ListObjects and PutObject appears in CloudTrail data events. AWS documentation on IAM last accessed information says action-level data covers management actions and not data plane actions, and the policy generation page says Access Analyzer does not identify S3 data events in generated policies. Use CloudTrail data events for who read which prefix.
Related pages
Sources
- Security best practices for Amazon S3, read 16 Nov 2026
- Bucket policy examples, read 16 Nov 2026
- IAM Access Analyzer for S3, read 16 Nov 2026
- IAM last accessed information, read 16 Nov 2026
- IAM Access Analyzer policy generation, read 16 Nov 2026
Last reviewed 16 Nov 2026.