Skip to content

Instantly share code, notes, and snippets.

@lewis262626
Created April 1, 2018 01:55
Show Gist options
  • Save lewis262626/7f32b29d7096ffecabefaf691607c5a9 to your computer and use it in GitHub Desktop.
Save lewis262626/7f32b29d7096ffecabefaf691607c5a9 to your computer and use it in GitHub Desktop.
s3cmd put script
#!/usr/bin/env bash
#Script to upload file(s) to an amazon s3 bucket with server side
# encryption and reduced redundancy storage to save money and
# use a private acl
if [ $# -ge 2 ]; then
s3cmd put $1 s3://$2 --server-side-encryption --reduced-redundancy --acl-private
else
echo "Not enough command line arguments detected"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment