# http://docs.aws.amazon.com/cli/latest/reference/s3/index.html
: ' aws s3 <Command> [<Arg> ...]
'
: ' Make sure you are configured
you`ll need your secret which is only created once!
'
# configure aws - https://console.aws.amazon.com/iam/home#users
aws configure
: '
AWS Access Key ID :
AWS Secret Access Key :
Default region name [None]:
Default output format [None]:
'
# list the contents of a bucket - https://console.aws.amazon.com/s3/home
aws s3 ls s3://your-bucket-name
: '
PRE folder/
PRE another-folder/
PRE the-folder/
'
# SYNC folder contents
aws s3 sync /tmp/foo s3://bucket/folder/
# upload only jpg
aws s3 cp /tmp/foo/ s3://bucket/folder/ --recursive --exclude "*" --include "*.jpg"
# upload only jpg & txt
aws s3 cp /tmp/foo/ s3://bucket/folder/ --recursive \
--exclude "*" --include "*.jpg" --include "*.txt"
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.