edit: finally figured it out (i swear i looked for a long time before posting) — if you create a nor
edit: finally figured it out (i swear i looked for a long time before posting) — if you create a normal cloudflare API token, and pick workers R2 as the scopes, it won't show an Access Key ID, even if it's transferred to be an R2-speicifc token with per-bucket access controls. you have to start at the R2 token UI in order to create a token that will show an Access Key ID for usage w/ the s3-compatible api
17 Replies
I have a r2 bucket setup. Would it be possible to allow other cloudflare users to upload/manage the bucket? I know you can do that for domaikns but I don't see anything "team" related for r2. Thanks in advance!
We are thinking about moving a analytics ingestion function from Lambda to Cloudflare.
Our products send small JSON payload to the endpoint, that runs on Lambda. There we use Kinesis Firehose to write the data to S3 in batches. The function calls a Kinesis JS SDK function and can return, and in the background those events are collected and then written to S3 in nice batches.
Does something similar exist for R2? Doesn't sound like the best idea to just write to R2 on each request probably.
Maybe #queues-beta
Ah yes, that sounds promising. There even is an example that is pretty close: https://developers.cloudflare.com/queues/examples/send-errors-to-r2/
Is it possible to limit the users based on how much bandwidth they used in a given time frame?
By bandwidth or requests? Cloudflare doesn't bill on bandwidth anyway
If your zone's on a paid plan, you can set a custom error response for 404 errors
https://developers.cloudflare.com/rules/custom-error-responses/
and then include
<meta http-equiv="refresh" content="0; url=[redirect url]>
in the htmlCustom error responses (beta) · Cloudflare Rules docs
Custom error responses, powered by the Ruleset Engine, allow you to define custom responses for errors returned by an origin server or by a Cloudflare …
yeah, unfortunately it can only be used in the api and not the dashboard
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
by bandwidth yes
Why would you want to block someone by bandwidth? That doesnt make any sense.
If you want to block someone though regardless of how you would need to do it yourself and use your own db for tracking whatever metric you want. Cloudflare does offer rate limiting rules though they are very very basic and arent really usable on the free plan tbh.
it does make sense in my case anyway. Like when you don't want a single user to absorb your whole dataset at once
rate limits make more sense
rate limites are just the number of requests, each file is huge so it wont work
Hi everyone,
I have seen notice while making bucket public for reading the object and I don't want to read files using presigned urls
how much is bad ?
Can you rephrase this question?
Hi, I am getting CORS error on R2 bucket connected through custom domain. I have added the CORS policy which has been working fine for me on other buckets but not on a particular bucket's. Is it because the files were uploaded before the CORS policy was added? If yes, how can I fix this?