Serverless Tutorial Pt. 1 Typo

Hello! The yaml file returns an error when formatted like this:

functions:
  hello:
    handler: handler.hello
    events:
      - http:
        path: beer/hello
        method: get

Provider information must be included as well:

service: aws-nodejs 
provider:
        name: aws
        runtime: nodejs14.x
functions:
  hello:
    handler: handler.hello
    events:
      - http:
         path: beer/hello
         method: get

The ‘path’ and ‘method’ terms of the array must be indented.

Serverless Tutorial Pt 1

Stack Overflow Reference on YAML indentation

There is mention of the provider information in part 2 @fapulito

1 Like

Thanks for sharing that link, @coelmay! Let us know if you have any more questions, @fapulito