Skip to content

Use Cloudfare R2 storage #1948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Use Cloudfare R2 storage #1948

wants to merge 9 commits into from

Conversation

apoorv1316
Copy link
Collaborator

What

  • Migrate from AWS S3 to Cloudafre R2 for storage

Closes #1946

@vipulnsward
Copy link
Contributor

Note, we also need to plan/migrate existing resources from S3 before we do this.

Comment on lines -10 to +16
amazon:
cloudfare:
service: S3
access_key_id: <%= ENV.fetch('AWS_ACCESS_KEY_ID', '') %>
secret_access_key: <%=ENV.fetch('AWS_SECRET_ACCESS_ID', '')%>
region: <%= ENV.fetch('AWS_REGION', '') %>
bucket: <%= ENV.fetch('AWS_S3_BUCKET_NAME', '') %>
access_key_id: <%= ENV.fetch('CLOUDFLARE_R2_ACCESS_KEY_ID', '') %>
secret_access_key: <%= ENV.fetch('CLOUDFLARE_R2_SECRET_ACCESS_KEY', '') %>
region: <%= ENV.fetch('CLOUDFLARE_R2_REGION', '') %>
bucket: <%= ENV.fetch('CLOUDFLARE_R2_BUCKET_NAME', '') %>
endpoint: <%= ENV.fetch('CLOUDFLARE_R2_ENDPOINT', '') %>
Copy link
Member

@deepakmahakale deepakmahakale Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we check for the existing items/attachments keep working/accessible If we move them directly from S3 to R2?

If not let's add a script similar to this and you may want to keep the :amazon service in storage.yml in that case

https://stackoverflow.com/a/71700068

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I remember I migrated the data to R2 using their tool and images were loading.
https://blog.cloudflare.com/r2-super-slurper-ga/
Also, I am occupied with billetto work so will not be able to work on this for now. Will continue on downtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move away from AWS s3 to use CF for storage instead
3 participants