Hi yamazaki,
Handling binary data with APIGW is a little tricky.
You can check my example for Java/JRestless here: https://github.com/bbilger/jrestless-examples/blob/master/aws/gateway/aws-gateway-binary/README.md
Aside from this:
- you must encode your data with base64 yourself when returning binary data (and set the “isBase64Encoded” attribute to true on the proxy response object)
- you must decode binary data with base64 when receiving binary data (the proxy request object will have the attribute “isBase64Encoded” set to true)
- APIGW will handle binary data (request/response) only when the request has proper Content-Type / Accept headers set with one of the ones you registered as binary media types