How can I use wildcards to `cp` a group of files with the AWS CLI

To download multiple files from an aws bucket to your current directory, you can use recursiveexclude, and include flags. The order of the parameters matters.

Example command:

aws s3 cp s3://data/ . --recursive --exclude "*" --include "2016-08*"

For more info on how to use these filters: http://docs.aws.amazon.com/cli/latest/reference/s3/#use-of-exclude-and-include-filters

Leave a Comment