When I try to use s3cmd it exits with the following error:
ERROR: S3 error: 403 (SignatureDoesNotMatch)
I have tried regenerating my keys as other similar questions suggested.
I am using s3cmd version 2.0.2.
My s3cmd configuration has the following relevant options:
[default]
access_key = REDACTED
access_token = REDACTED
...
host_base = sfo2.digitaloceanspaces.com
host_bucket = %(bucket)s.sfo2.digitaloceanspaces.com
The s3cmd command I am trying to run is:
s3cmd put foo.txt s3://SPACE/ -c ./s3cmd-cfg
The space I am trying to access is in SFO2.
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!
Accepted Answer
Hey friend,
I do not consider myself an expert on s3cmd, and I realize that you already have a configuration file, but can you try setting up the configuration specifically by the steps we’ve outlined here?
https://www.digitalocean.com/docs/spaces/resources/s3cmd/
It may be some very small difference that is made by using those steps.
Jarland
same error:
s3cmd --version
s3cmd version 2.2.0
New settings:
Access Key: xxxxxxxxxx
Secret Key: xxxxxxxxxxxx
Default Region: fra1
S3 Endpoint: fra1.digitaloceanspaces.com
DNS-style bucket+hostname:port template for accessing a bucket: %(bucket)s.nyc3.digitaloceanspaces.com
Encryption password: secure_password
Path to GPG program: /usr/bin/gpg
Use HTTPS protocol: True
HTTP Proxy server name:
HTTP Proxy server port: 0
Test access with supplied credentials? [Y/n] Y
Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)
Now verifying that encryption works...
Success. Encryption and decryption worked fine :-)
Save settings? [y/N] y
Configuration saved to '/home/name/.s3cfg'
s3cmd mb s3://spacename3
ERROR: S3 error: 400 (XAmzContentSHA256Mismatch)
I did follow the setting documentation: https://docs.digitalocean.com/products/spaces/reference/s3cmd/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.