You can now send and receive binary data through API endpoints hosted on Amazon API Gateway. Binary data can either pass through directly or be converted to Base64 encoded text.
You can specify media types (e.g., image/png, application/octet-stream, etc.) to treat as binary through the API Gateway console or APIs. Web or mobile clients can then leverage standard HTTP headers (Content-type and Accept) to declare what they are sending or expecting to receive. You can also configure API Gateway to either pass through, convert to text (Base 64 encoding), or convert to binary (Base64 decoding) the API integration request and response body.
For more information, see Binary Support for API Integrations with Amazon API Gateway post on the AWS Compute Blog, or the API Gateway Payload Encodings topic in the Amazon API Gateway Developer Guide.