Skip to content

Serverless framework plugin to configure Binary responses in API Gateway

Notifications You must be signed in to change notification settings

venn-city/serverless-apigwy-binary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverless-apigwy-binary

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 The plugin assumes you have apiGateway.restApiId configuration in your serverless.yml, it won't work otherwise.

# serverless.yml

plugins:
  - serverless-apigwy-binary

Add the property contentHandling: CONVERT_TO_BINARY to an HTTP event

# serverless.yml
provider:
  name: aws
    apiGateway:
      restApiId: {YOUR_REST_API_ID}
      restApiRootResourceId: {YUOR_ROOT_RESOURCE_ID}  
  ...
  functions:
    hello:
      handler: handler.hello
      events:
        - http:
            integration: lambda
            path: hello
            method: get
            contentHandling: CONVERT_TO_BINARY

About

Serverless framework plugin to configure Binary responses in API Gateway

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%