Report this

What is the reason for this report?

Can't getObject from Space.

Posted on December 24, 2021
ofca

By ofca

Hi,

I have upload a file to Space (without problems) with ACL set to “public-read”. Now when I enter URL in the browser https://<bucket-name>.fra1.digitaloceanspaces.com/user_avatars/<file-name> the file is displayed properly. But when I try to get it using AWS SDK I get:

Error executing "GetObject" on "https://<bucket-name>.fra1.digitaloceanspaces.com/<file-name>"; AWS HTTP error: Client error: `GET https://<bucket-name>.fra1.digitaloceanspaces.com/<file-name>` resulted in a `403 Forbidden` response (client): 403 Forbidden (Request-ID: tx0000000000000b3e20cb2-0061c5f855-25a456e3-fra1b) - SignatureDoesNotMatchtx0000000000000b3e20cb2-0061c5f855-25a456e3-fra1b25a456e3-fra1b-fra1-zg02

I don’t know what I’m doing wrong.

P.S. File was uploaded as “private” but then changed manually in spaces UI to be “public” if that matters.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello @ofca,

This may be a CORs issue in this case. You may need to set CORs configurations on your Space. As the AWS SDK is pulling that, it may be blocked by CORs.

You can setup CORs on your space by following our docs here.

Hope it helps! Nate

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.