Search code examples
aws-lambdaserverless-framework

Serveless config - unsupported function event


Below is the relevant chunk of my serverless.yml file. When I run serverless deploy I get the following message:

Serverless: Configuration warning at 'functions.query.events[0]': unsupported function event
package:
  include:
    - handler.py
    - utils.py

functions:
  query:
    handler: handler.query
    events:
      - httpApi:  
        method: get

I've had this problem before and it was just a matter of indentation. Could someone point out what am I getting wrong?


Solution

  • The issue in your example is caused by invalid indentation in the config - it should looks like this:

    package:
      include:
        - handler.py
        - utils.py
    
    functions:
      query:
        handler: handler.query
        events:
          - httpApi:  
              method: get