Skip to content

Instantly share code, notes, and snippets.

@mb00g
Last active June 16, 2020 11:13
Show Gist options
  • Save mb00g/493686bbf45766daf25793ae99d93660 to your computer and use it in GitHub Desktop.
Save mb00g/493686bbf45766daf25793ae99d93660 to your computer and use it in GitHub Desktop.

cat ~/.s3cfg

[default]
access_key = <accesskey>
secret_key = <SecretKey>
host_bucket = %(bucket).localhost:8000
signature_v2 = False
use_https = False
host_base = 178.x.x.x:8000

Create a Bucket

s3cmd mb s3://njajal

List all available buckets

$ s3cmd ls

2020-06-16 10:23  s3://njajal

Copy file into bucket

$ s3cmd put s3file.png s3://njajal            

upload: 's3file.png' -> 's3://njajal/s3file.png'  [1 of 1]
 14653 of 14653   100% in    0s   143.88 KB/s  done

Confirm that the file has been copied over:

$ s3cmd ls s3://njajal

2020-06-16 10:55        14653  s3://njajal/s3file.png

Make S3 object public

$ s3cmd setacl s3://njajal/s3file.png --acl-public

s3://njajal/s3file.png: ACL set to Public  [1 of 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment