Corrupted files uploaded to s3 using mobile:stopPerfRecord

I’m using the startPerfRecord command to trace iOS metrics. It works fine until I try to do stopPerfRecord.
Without remotePath, it fails to base64/transfer the file if the file is too large. So I switched to using remotePath. I tried to use FTP at first, but it is failing as well with MacOS FTP server on unhandled error during pasv command and terminates appium server.
Right now I’m trying to use AWS pre-signed URLs and it uploads files fine, but the zip files are corrupted.

Are there any best practices on how to configure remotePath and/or s3 bucket to make it work?

I’m using appium 2.1.3