AWS Simple Storage Service - S3

Here are some useful command for S3.  Most the commands below that move or copy follow a similar pattern of

<s3-command> <source> <destination>

 

Copy Files


# get all the files from a bucket and copy them to the local folder
# this will do a recursive call getting all the folders and files
# and copy to your local directory
aws s3 cp s3://<bucket-name> . \
--recursive

# copy local files to a bucket
aws s3 cp <specific-file> s3://<bucket-name>

# copy all files to a bucket
aws s3 cp . s3://<bucket-name> -- recursive

 

Move files

aws s3 --recursive mv  \
<source-bucket-name>/<folder>\
<destination-bucket-name>/<folder> \
   --recursive