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.
How to manage object visibility
Reviewed on 19 December 2024 • Published on 27 May 2021
Object visibility specifies whether your object is visible to others or not, independently from bucket visibility.
Before you startLink to this anchor
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An Object Storage bucket
Note
Manage the visibility of a single objectLink to this anchor
- Click Object Storage in the Storage section of the side menu. The list of your buckets displays.
- Click the name of your bucket. A list of your objects displays.
- Click «See more Icon» next to the selected object name.
- Click Visibility. A pop-up appears.
- Check Public or Private according to your preference.
- Click Update object visibility to confirm.
Tip
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.
Manage the visibility of multiple objectsLink to this anchor
You can manage the visibility of multiple objects 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"]},]}
Was this page helpful?