R2 - setting bucket's ACL policy to public

Answer these questions to help the Community help you get started.

What is the domain name?
None. It’s about R2.

Have you searched for an answer?
yes

Please share your search results url:
https://www.google.com/search?q=cloudflare+r2+acl&ei=lMi5Yq7SGbjk7_UP8_yLqAY&ved=0ahUKEwiu7Oqm9c34AhU48rsIHXP-AmUQ4dUDCA4&uact=5&oq=cloudflare+r2+acl&gs_lcp=Cgdnd3Mtd2l6EAM6BwgAEEcQsAM6CAgAEB4QCBAHOgYIABAeEA06CAgAEB4QDRAFOggIABAeEAgQDToICAAQHhAPEA1KBAhBGABKBAhGGABQ2AFYvxhg7RloAnABeAGAAX2IAfwGkgEEMTEuMZgBAKABAcgBCMABAQ&sclient=gws-wiz

When you tested your domain using the Cloudflare Diagnostic Center, what were the results?

Describe the issue you are having:
What’s the easiest way how to set all files in a bucket to be accessible publicly only via https://? In S3 I use s3cmd tool: s3cmd setacl --acl-public s3://dbc-content --recursive or simply via admin interface (Digital Ocean Spaces).

What error message or number are you receiving?
ERROR: S3 error: 501 (NotImplemented): GetBucketAcl not implemented

1 Like

As the error message suggests, this isn’t something that’s currently implemented. Public buckets are definitely something the team want to support in future though, so stay tuned. I’d recommend joining the Developers Discord for regular R2 updates from the team.

For now, the best way to expose a bucket with public access is via a worker like this one:

https://developers.cloudflare.com/r2/examples/demo-worker/ is also a good guide.

2 Likes

Thanks. Do I understand it correctly that if I use a worker to expose the bucket, every request to the worker will be counted towards the Worker request limit> and I’ll be charged for that?

That is correct, yes. They’re pretty affordable even if you tally them with the cost of R2 up against other competitors though.

https://developers.cloudflare.com/workers/platform/pricing/

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.