Note
All objects are private by default, even if they are in a public bucket. A private file in a public bucket cannot be accessed publicly.
Object visibility specifies whether your object is visible to others or not, independently from bucket visibility.
To complete the actions presented below, you must have:
All objects are private by default, even if they are in a public bucket. A private file in a public bucket cannot be accessed publicly.
If you upload a file using the CLI, you can make it public by using the --acl public-read
parameter. However, bucket policies take precedence over ACLs.
You can manage the visibility of multiple ojects at a time using a bucket policy as shown below. By allowing GetObject operations to everyone, the desired objects can be accessed by any person with the link to the object.
{"Id": "object-visibility","Version": "2023-04-17","Statement": [{"Sid": "make-objects-visible","Principal": "*","Action": ["s3:GetObject"],"Effect": "Allow","Resource": ["my-bucket/public-objects"]},]}
Your opinion helps us make a better documentation.