0

TL;DR If your use of s3cmd on Spaces from DigitalOcean says:

Could not refresh role

Then try removing the cfg for it and starting again.

I was using the DigitalOcean Spaces and I somehow got my configuration of the API messed up when using the s3cmd. I couldn't figure out how to make the following error go away:

WARNING: Could not refresh role
ERROR: Test failed: 501 (NotImplemented): Server does not support one or more requested headers. Please see https://developers.digitalocean.com/documentation/spaces/#aws-s3-compatibility

This was done when I was configuring the using the s3cmd -c ~/cfg_file/location --configure command.

I got there because when I used the command like s3cmd -c ~/cfg_file/location la s3://somespace I would get:

WARNING: Could not refresh role
WARNING: Could not refresh role
ERROR: S3 error: 501 (NotImplemented): Server does not support one or more requested headers. Please see https://developers.digitalocean.com/documentation/spaces/#aws-s3-compatibility

So, after about 20 minutes of messing around with it, making new API keys, etc. I decided to just delete the cfg profile and start from scratch. That did the trick.

So, for others, I thought I would put this here so when they search, they will at least get an answer to the basic question, what should I do to move forward :)

Hope it helps.

Epilogue: I am sure someone will say that I didn't solve the "actual" issue and that this will pop-up again. They are right :) I just needed to move on and deleting the configuration file and starting with a new one was the fastest most "rational" way that I could think of always getting back to "known" state. So, if you do know more about "why" the s3cmd configuration file was messed up and how to fix it by modifying the file, please do tell. I just didn't have the time or energy to "read the code" :)

0 Answers0