Installation

See https://s3tools.org/download

  • Download the zip, unzip, cd into the folder.
  • python setup.py install

Configuration

Answer questions with the following answers:

  1. s3cmd --configure
  2. ...
  3. New settings:
  4. Access Key: any_no_empty_key
  5. Secret Key: any_no_empty_key
  6. Default Region: US
  7. S3 Endpoint: localhost:8333
  8. DNS-style bucket+hostname:port template for accessing a bucket: localhost:8333
  9. Encryption password:
  10. Path to GPG program: /usr/local/bin/gpg
  11. Use HTTPS protocol: False
  12. HTTP Proxy server name:
  13. HTTP Proxy server port: 0

Make sure the .s3cfg file has these values

  1. # Setup endpoint
  2. host_base = localhost:8333
  3. host_bucket = localhost:8333
  4. use_https = No
  5. # Enable S3 v4 signature APIs
  6. signature_v2 = False

Execute commands

  1. $ s3cmd mb s3://newbucket
  2. Bucket 's3://newbucket/' created
  3. $ s3cmd ls s3://
  4. 2019-01-01 01:30 s3://newbucket
  5. $ s3cmd put /etc/passwd s3://newbucket
  6. WARNING: Module python-magic is not available. Guessing MIME types based on file extensions.
  7. upload: '/etc/passwd' -> 's3://newbucket/passwd' [1 of 1]
  8. 6804 of 6804 100% in 0s 87.93 kB/s done
  9. $ s3cmd get s3://newbucket/passwd
  10. download: 's3://newbucket/passwd' -> './passwd' [1 of 1]
  11. 6804 of 6804 100% in 0s 595.33 kB/s done
  12. # change the file
  13. $ vi passwd
  14. $ s3cmd sync passwd s3://newbucket/
  15. WARNING: Module python-magic is not available. Guessing MIME types based on file extensions.
  16. upload: 'passwd' -> 's3://newbucket/passwd' [1 of 1]
  17. 22 of 22 100% in 0s 6.45 kB/s done
  18. Done. Uploaded 22 bytes in 1.0 seconds, 22.00 B/s.
  19. $ s3cmd ls s3://newbucket/
  20. 2019-01-01 01:32 22 s3://newbucket/passwd
  21. $ s3cmd del s3://newbucket/passwd
  22. delete: 's3://newbucket/passwd'
  23. $ s3cmd rb s3://newbucket
  24. Bucket 's3://newbucket/' removed