Limit r2 storage spending

What is the name of the domain?

Irrelevant

What is the issue you’re encountering

I fear that the billing may be too high

In what area can we help you?

I don’t know

What are the steps to reproduce the issue?

Can I limit the r2 spending to, for example, 5$. I chose Cloudflare because egress is free, and I don’t want any unexpected charges. I don’t really have “users” because I have a blog, but a friend of mine had a bad experience with one of its posts going viral and having a jumpscare from another provider.

As r2 doesn’t charge for egress, I can just stop updating the files or delete very big files, but I want to put some kind of hard limit on spending, in case a script or something goes nuts.

You can’t limit it.

The best you can do is create alerts that will notify you when certain operations exceed thresholds:

https://dash.cloudflare.com/?to=/:account/notifications/create/billing_usage_alert

1 Like

As R2 has free egress, I ended up using a cron job in my server to update the results every few hours.

I guess this could also be done with a worker to make it serverless.

1 Like

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