The bucket does not allow ACLs

AI-generated summary

The bucket does not allow ACLs

Olivier_Lambert is trying to enable Amazon S3 for image uploads in Discourse but is getting an error. After sharing their config and policy JSON, Simon_Manning suggests that the issue may be due to a bucket setting that disables ACLs by default. Olivier_Lambert confirms that this is the problem and thanks Simon_Manning for the solution.

As a side note, pfaffman and RGJ point out that Olivier_Lambert should update their OS and Discourse version.

Hey guys!

I’m trying to enable Amazon S3 for image uploads since my server is getting pretty full and SSD storage is expensive! :money_mouth_face:

I’m getting this error when I try to upload on my Amazon S3 bucket:

Here’s my config:


Here’s my bucket public access config:

I’ve followed this guide:

Here’s my policy json:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:List*",
                "s3:Get*",
                "s3:AbortMultipartUpload",
                "s3:DeleteObject",
                "s3:PutObject",
                "s3:PutObjectAcl",
                "s3:PutObjectVersionAcl",
                "s3:PutLifecycleConfiguration",
                "s3:CreateBucket",
                "s3:PutBucketCORS"
            ],
            "Resource": [
                "arn:aws:s3:::forumlatrancheecom",
                "arn:aws:s3:::forumlatrancheecom/*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListAllMyBuckets",
                "s3:ListBucket"
            ],
            "Resource": "*"
        }
    ]
}

My backups are working so the configuration is “somewhat” working. Not sure where to look in order to debug. :confused: Any help would be greatly appreciated!

I’m running discourse 2.9.0.beta10 hosted on Digital Ocean Ubuntu 16.04 if that helps…

It’s not related to your S3 issues, but you need to upgrade your os.

And while you’re at it, you urgently need to update your Discourse :wink:

I’m not 100% sure but I think the following bucket setting became the default since that documentation was written, which also disables ACLs.

It’s in the bucket permissions just past the block public access and bucket policy settings.

Jesus, the update bullying on this forum is strong! :laughing: Will do!

That solved it! Many thanks Simon! :slight_smile: