[Uploading to S3 in sh](https://tmont.com/blargh/2014/1/uploading-to-s3-in-bash) ``` file=/path/to/file/to/upload.tar.gz bucket=your-bucket resource="/${bucket}/${file}" contentType="application/x-compressed-tar" dateValue=`date -R` stringToSign="PUT\n\n${contentType}\n${dateValue}\n${resource}" s3Key=xxxxxxxxxxxxxxxxxxxx s3Secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx signature=`echo -en ${stringToSign} | openssl sha1 -hmac ${s3Secret} -binary | base64` curl -X PUT -T "${file}" \ -H "Host: ${bucket}.s3.amazonaws.com" \ -H "Date: ${dateValue}" \ -H "Content-Type: ${contentType}" \ -H "Authorization: AWS ${s3Key}:${signature}" \ https://${bucket}.s3.amazonaws.com/${file} ```