diff --git a/lib/ansible/modules/cloud/amazon/s3_sync.py b/lib/ansible/modules/cloud/amazon/s3_sync.py index 2ad3a8e0b41..1547da4f6b0 100644 --- a/lib/ansible/modules/cloud/amazon/s3_sync.py +++ b/lib/ansible/modules/cloud/amazon/s3_sync.py @@ -428,12 +428,11 @@ def upload_files(s3, bucket, filelist, params): ret = [] for entry in filelist: args = { - 'ContentLength': entry['bytes'], 'ContentType': entry['mime_type'] } if params.get('permission'): args['ACL'] = params['permission'] - s3.upload_file(entry['fullpath'], bucket, entry['s3_path'], ExtraArgs=None, Callback=None, Config=None) + s3.upload_file(entry['fullpath'], bucket, entry['s3_path'], ExtraArgs=args, Callback=None, Config=None) ret.append(entry) return ret