uploading image from lambda to s3 ( corrupted file )
In my case, it was API Gateway fault, it turns out you have to enable binary support, otherwise, the lambda function will never receive the binary content:
- Go to settings of you ApiGateway endpoint
- Go to Binary Media Types
- Add new binary type and put: image/jpg
Also if your Lambda function is behind a VPC and a security group, first check if it works without VPC first.