Skip to content

moravcik/serverless-offline-unsupported-media-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a showcase for serverless-offline issue: dherault/serverless-offline#747

Steps to reproduce:

  1. clone this repo and cd into its directory
  2. install dependencies: npm install
  3. start serverless offline: sls offline or npm start
  4. navigate browser to localhost:4000/api

Unsupported Media Type error is logged in the console:

Serverless: GET /api (λ: apiTest)
Serverless: Failure: Unsupported Media Type
UnknownError: Unsupported Media Type

Expected - invoke lambda from within other http-event triggered lambda

I'm using node version 10.15.3


UPDATE: as pointed by @vepanimas, it works if function name is specified as: {service-name}-{stage}-{name}

in our case:

INVOKE_FUNCTION: '${self:service}-${self:provider.stage}-invokeTest'

Releases

No releases published

Packages

No packages published