Created
October 18, 2019 01:22
-
-
Save EngineerLabShimazu/b7a4c11c6552eb29b7e22c0b255dd637 to your computer and use it in GitHub Desktop.
Schedule upload to S3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# $ crontab -l | |
# * 23 * * * bash /path/to/s3_uploader.sh | |
# $ which aws | |
# /usr/local/bin/aws | |
# Add path to aws cli | |
PATH=$PATH:/usr/local/bin | |
UPLOAD_FILE=/your/upload/file | |
UPLOAD_DESTINATION=s3://your-bucket-name | |
UPLOAD_LOG=/your/uploaded/log-file | |
export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY | |
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY | |
aws s3 cp $UPLOAD_FILE $UPLOAD_DESTINATION --acl private &> $UPLOAD_LOG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO