Skip to content

Instantly share code, notes, and snippets.

@derwiki
derwiki / s3.sh
Last active May 31, 2018 08:56 — forked from chrismdp/s3.sh
PUT to S3 via cURL, Bash -- no external dependencies
#!/bin/bash
# usage ./s3.sh filename.ext remote/path/filename.ext
S3_KEY="REDACTED"
S3_SECRET="REDACTED"
S3_BUCKET="REDACTED"
REMOTE_PATH=$2
date=$(date +"%a, %d %b %Y %T %z")
acl="x-amz-acl:public-read"