• Pricing
© 2025 Serverless, Inc. All rights reserved.
Terms of ServicePrivacy Policy
ryanmurakami

Serverless Apigwy Binary

by

Serverless plugin for configuring API Gateway to return binary responses

0
29
  1. Serverless Apigwy Binary

serverless-apigwy-binary

DEPRECATED

Functionality as provided by plugin is available in Serverless Framework natively (since v1.59.0)

contentHandling on http event responses can be confgured simply as:

functions:
  someFunction:
    events:
      - http:
          ....
          response:
            contentHandling: CONVERT_TO_BINARY

Legacy Documentation

Serverless framework plugin to configure Binary responses in API Gateway

Original code from codebox

Installation

Install to your Serverless project via npm

$ npm install --save serverless-apigwy-binary

Usage

Add the plugin to your serverless.yml

# serverless.yml

plugins:
  - serverless-apigwy-binary

Add the property contentHandling: CONVERT_TO_BINARY to an HTTP event

# serverless.yml

functions:
  hello:
    handler: handler.hello
    events:
      - http:
          integration: lambda
          path: hello
          method: get
          contentHandling: CONVERT_TO_BINARY

Contents

  • serverless-apigwy-binary
  • DEPRECATED
  • Legacy Documentation
  • Installation
  • Usage

Related

GuidesPluginsExamplesSlack CommunitySupport