I have configured an API gateway in front of S3 and set up binary file support for API gateway following this
https://docs.aws.amazon.com/apigateway/latest/developerg