This Python script will allow you to merge small files in S3 for downstream distributed processing with AWS Glue, Amazon EMR, or Amazon Athena. You need to adjust the following parameters:
bucket_name, source_prefix, destination_prefix, merge_size_limit_bytes