Skip to content

Instantly share code, notes, and snippets.

View javisabalete's full-sized avatar

Javi Sabalete javisabalete

View GitHub Profile
@javisabalete
javisabalete / aws-s3-curl-requests.txt
Created June 21, 2017 15:49
AWS S3 CURL Requests
PUT
limit=5000
resource="/${BUCKET}/${OBJECT}"
dateValue=`date -R`
stringToSign="PUT\n\n\n${dateValue}\n${resource}"
signature=`/bin/echo -en ${stringToSign} | openssl sha1 -hmac ${PASS} -binary | base64`
curl --limit-rate ${limit}K -f -X PUT -T "${file}" \
-H "Host: ${BUCKET}.s3.amazonaws.com" \
-H "Date: ${dateValue}" \