Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS S3 make public via ACL disabled?

I am trying to make my file public through AWS management console, I have already turned off the bucket block public access as below.

enter image description here

But when I go to the file and try to make the file public, the option is disabled

enter image description here

I followed the official instruction on AWS, but apparently, it had some new updates on this option.

https://aws.amazon.com/tw/premiumsupport/knowledge-center/read-access-objects-s3-bucket/

Am I missing anything or there are some settings I did'nt do ?

like image 969
Kai021195 Avatar asked Sep 11 '25 13:09

Kai021195


2 Answers

Probably the bucket has ACLs disabled.

Since November 2021, you can disable access control lists (ACLs). Using ACLs is not recommended except in unusual circumstances where you need to control access for each object individually. Instead you should grant permissions using the bucket policy.

Anyway, if you need to use ACLs then to enable it go to Permissions tab and change the Object Ownership option:

Object Ownership

like image 90
OARP Avatar answered Sep 13 '25 05:09

OARP


You can try to edit the bucket policy as step 2 of this documentation.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::Bucket-Name/*"
            ]
        }
    ]
}

This reading may also helps: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-photos-view.html

like image 40
Dave Yu Avatar answered Sep 13 '25 05:09

Dave Yu