R2 Storage url not working with aws s3 sdk

For Workers & Pages, what is the name of the domain?

xxx.r2.cloudflarestorage.com

What is the error number?

[Error: getaddrinfo ENOTFOUND xxx.r2.cloudflarestorage.com]

What is the error message?

[Error: getaddrinfo ENOTFOUND xxx.r2.cloudflarestorage.com] { errno: -3008, code: ‘ENOTFOUND’, syscall: ‘getaddrinfo’, hostname: ‘xxx.r2.cloudflarestorage.com’, ‘$metadata’: [Object] }

What is the issue or error you’re encountering

While upload file to r2 storage using bucket getting error

What steps have you taken to resolve the issue?

Checked all the possible solutions

Screenshot of the error

As you are discussing PII on a public topic, I believe it would be better to discuss this through a Support Ticket. For this reason, I’ll also be editing your post and remove any personal information.

Please submit a new support request from the email address you used to register your Cloudflare account.

You should open a ticket directly through the Cloudflare dashboard following these steps:

  1. Log in to your Cloudflare account and click on “Support” in the top right corner, from the drop down select Help Center.

  2. Click on your name in the top right corner, and in the drop down menu select “My activities” where you will see your existing requests.

  3. Scroll to the bottom of the “My Requests” page and click “Submit a request”. Please post the ticket number here, even if the ticket auto-closes. Support can re-open the ticket if necessary.