R2 Bucket Policies

Hi!

Is there any way to change the bucket policy using the cli, like this example:

    "Statement": [
        {
            "Sid": "AllowEveryoneReadOnlyAccess",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:ListBucket",
                "s3:GetObject"
            ],
            "Resource": [
                "test",
                "test/*"
            ]
        }
    ]

Thank you!

Not at the moment - a bucket is currently just private for all and access is controlled by the API tokens or by a Worker that is bound to the bucket.

The rest of the current S3 compatibility is listed here: https://developers.cloudflare.com/r2/platform/s3-compatibility/api/

2 Likes