Giter Site home page Giter Site logo

serverless-plugin-custom-binary's Introduction

CircleCI

serverless-plugin-custom-binary

This is a plugin for Serverless that sets up BinaryMediaTypes and ContentHandling to enable support for Binary Payloads in API Gateway.

Usage

service: my-service

plugins:
  - serverless-plugin-custom-binary

custom:
  apiGateway:
    binaryMediaTypes:
      - 'application/json'

functions:
  helloword:
    handler: handler.hello
    events:
      - http:
        path: /hello
        method: GET
        contentHandling: CONVERT_TO_BINARY

Notes

Several other plugins exist but now CloudFormation appears to support configuring these properties directly. The other plugins make sure of API calls that create race conditions or otherwise complicate deployments.

serverless-plugin-custom-binary's People

Contributors

dougmoscrop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

serverless-plugin-custom-binary's Issues

Issue with Response Headers

I have the below config

events:
      - http:
          path: example/message
          method: get
          integration: lambda
          contentHandling: CONVERT_TO_BINARY
          response:
            statusCodes:
              200:
                pattern: '' # Default response method
                headers:
                  Content-Type: "'application/pdf'"

The value of response headers "Content-Type" is getting removed from integration response - response headers, if I provide a value for "contentHandling". Tested with out "contentHandling" and its working fine.

Doesn't work with Lambda Proxy

Unless I'm mistaken, this wont work with Lambda Proxy integration as there is no IntegrationResponse to add contentHandling to.

Is this correct? If yes, possibly a note in the readme would help. Spent a good day stuck on this one..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.