How to use AWS CLI to only copy files in S3 bucket that match a given string pattern?

You can use include and exclude parameters with aws s3 cp command to copy files in the S3 bucket that match a given string pattern. Though the support for the pattern is very primitive and currently does not support all the regex functionality that we love and use. Here is one example to copy file with a particular extension

Leave a Reply

Close Menu