Skip to content

Instantly share code, notes, and snippets.

@anilbhanushali
Created October 22, 2018 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anilbhanushali/160f7776fedfa615d5c9056b6988c912 to your computer and use it in GitHub Desktop.
Save anilbhanushali/160f7776fedfa615d5c9056b6988c912 to your computer and use it in GitHub Desktop.
upload file to S3 via curl on public bucket
bucket=my-test-bucket
dateValue=`date -R`
file=file.tar.bz2
curl -L -vv -X PUT -T "${file}" \
-H "Host: ${bucket}.s3.amazonaws.com" \
-H "Date: ${dateValue}" \
https://${bucket}.s3.ap-south-1.amazonaws.com/${file}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment