Use bucket policies to define permitted access
How bucket policies, public access controls, and encryption settings protect data-lake objects. · associate
A data lake often separates objects into prefixes such as raw/ and curated/. A bucket policy is a resource-based JSON policy attached to an S3 bucket. It identifies the principal, permitted or denied actions, affected resources, and any conditions. Use specific role principals and narrow permissions rather than granting broad access.
Match the resource to the action. s3:ListBucket applies to the bucket ARN, such as arn:aws:s3:::lake-example; an s3:prefix condition can restrict listing. s3:GetObject applies to object ARNs, such as arn:aws:s3:::lake-example/curated/*. Permission to list a prefix does not itself grant permission to read its objects.
Bucket policies work with IAM identity policies and other applicable controls. An applicable explicit deny overrides an allow. For cross-account access, the caller generally needs permission from its own account as well as permission from the bucket's account; a bucket-policy allow is not a universal bypass.