this is how my serverless.yml section looks like:
serverless.yml
my-function: - http: # <---- http method: POST path: /my-function