Report this

What is the reason for this report?

DigitalOcean spaces presigned url upload accessdenied

Posted on January 4, 2021

Hello. I am following the s3 examples guide for digital ocean spaces here :https://www.digitalocean.com/docs/spaces/resources/s3-sdk-examples/ and have just created a presignedurl to upload an object. It seems to be working fine and I have a url to upload the object to, however when I curl -X PUT a file to this url, I am getting the following json response: <?xml version=“1.0” encoding=“UTF-8”?><Error><Code>AccessDenied</Code><RequestId>tx000000000000006cf20aa-005ff38027-2a11b61-nyc3c</RequestId><HostId>2a11b61-nyc3c-nyc3-zg03</HostId></Error>‘Content-Type’ is not recognized as an internal or external command, operable program or batch file. ‘Expires’ is not recognized as an internal or external command, operable program or batch file. ‘Signature’ is not recognized as an internal or external command, operable program or batch file.



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.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

The error message you are seeing typically indicates there’s an issue with your permissions setting for that Space or the Access Key provided is not correct.

It’s important to make sure that:

  • The AWS credentials you’re using are the same ones that correspond to the DO Space.
  • Your Space is set to allow these functions from the credentials being used. Refer to the Spaces Access Control documentation here.

If the issue persists even after checking these details, you might want to regenerate your Spaces access keys from your DigitalOcean Control panel.

For more detailed information, you can review the DigitalOcean documentation here.

Hope that this helps!

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.