How to search for files in S3 bucket folder using wildcard

aws s3 ls s3://bucketname/prefix1/prefix2/ | grep searchterm* | awk '{print $4}'

See also  How to create and refresh a Materialized view in Redshift