Serverless framework - uploading files to S3 become corrupted

cloudformation
lambda
aws
#1

Hello,
I have created a sample serverless framework, it has a function to upload files on s3 but I am facing issues while uploading files. (Files are getting uploaded but it turns out to be corrupt.)
Thanks.

#2

What types of files?

“Binary” files, e.g. ZIP are not working using the Node.js (if that’s what you have) SDK. I switched to this one: https://github.com/Automattic/knox

That works for both ZIP and JAR files for me!

#3

We are using CSV files and excel.