serverless-apigw-binary icon indicating copy to clipboard operation
serverless-apigw-binary copied to clipboard

Is it possible to use this plugin locally?

Open gitowiec opened this issue 7 years ago • 6 comments

I would like to use this plugin when calling serverless webpack serve --function run locally for development. I did it but the event parameter does not contain file content (I use Postman with POST and binary file in body) Here's my serverless.yml:

service: serverless-chrome

provider:
  name: aws
  runtime: nodejs6.10
  stage: dev
  region: eu-west-2
  environment:
    CHROME_PATH: ${opt:chromepath, './headless-chrome/headless_shell'}

custom:
  webpackIncludeModules: false # disable auto including modules
  apigwBinary:
      types:           #list of mime-types
        - 'application/zip'
        - 'application/octet-stream'
        - 'application/x-zip-compressed'
        - 'text/html'
        - 'text/plain'
        - 'text/css'
        - 'text/javascript'

plugins:
  - serverless-webpack
  - serverless-apigw-binary

functions:
  run:
    description: Run headless Chromium
    memorySize: 1536
    timeout: 30
    handler: handler.run

    events:
      - http:
          path: package
          method: post

gitowiec avatar Oct 05 '17 11:10 gitowiec

Hello,

Thanks for this report. I will take a look at it in the first possible moment.

maciejtreder avatar Oct 11 '17 21:10 maciejtreder

Any news on this one?

zivc avatar Apr 21 '18 10:04 zivc

Up :) !

RPDeshaies avatar Aug 15 '18 21:08 RPDeshaies

it doesn't look like this works in local/offline mode.

fusionbeam avatar Feb 21 '19 19:02 fusionbeam

correction. it works fine.

fusionbeam avatar Feb 22 '19 21:02 fusionbeam

this thread isn't applicable to using serverless-offline, is it? Having a similar issue.

mooniker avatar Jul 02 '19 19:07 mooniker