regarding binary
check this: How to add binary media type to serverless.yml
The important steps are to
- to register binary media types (that’s not possible with serverless - you either need to do this manually or use some plugin)
- to send a “Content-Type” request-header with one of the registered binary media types as value
- decode the base64 encoded body, manually
regarding the timeout:
- Spring Boot is a probably a little heavy… try to unregister everything that’s not really required (add some logging to see where you actually waste the time)
- increase the timeout of your lambda function to 60s