Skip to content

Function Routes Defined in file not loaded #47

@Captnwalker1

Description

@Captnwalker1

In my working serverless project deployed already to AWS we have our functions defined in seperate yml files. This doesn't seem to work with serverless-offline

functions:
  devices: ${file(resources/functions/devices.yml)}
  load: ${file(resources/functions/load.yml)}
  registration: ${file(resources/functions/registration.yml)}
  getMessages: ${file(resources/functions/getMessages.yml)}
handler: functions/registration.handler
events:
  - http:
      path: /${self:custom.version}/registration
      method: get
      cors: true

I start serverless with sls offline --providedRuntime 11.10.1

I keep getting error

{"statusCode":404,"error":"Serverless-offline: route not found.","currentRoute":"get - /v1/registration","existingRoutes":[]}

Your Environment Information ---------------------------
Operating System: darwin
Node Version: 11.10.1
Framework Version: 1.51.0
Plugin Version: 1.3.10
SDK Version: 2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions