httpApi endpoints not published when indent with space=2 in serverless.yml

I posted a query about httpApis a few minutes ago but can’t find that post anymore - weird? Anyway the problem was that my serverless.yml was incorrect, i had:

functions:
  hello:
    handler: hello.get
    events:
      - httpApi:
        method: GET
        path: /hello

whereas i needed:

functions:
  hello:
    handler: hello.get
    events:
      - httpApi:
          method: GET
          path: /hello

Can you see the difference? I couldn’t. I didn’t have the right number of spaces on the lines below the - httpApi line. NB The incorrect .yml is generated automatically by vscode when indent with 2 spaces is set. The behaviour you get is that serverless deploys the lambda without a problem but doesn’t create the endpoints, you just see:

endpoints:
  None

Try it out by passing path as hello instead of /hello

service:
name: myService
awsKmsKeyArn: arn:aws:kms:us-east-1:XXXXXX:key/some-hash # 192.168.100.1 jpg to pdf Optional KMS key arn which will be used for encryption for all functions

frameworkVersion: ‘>=1.0.0 <2.0.0’