Serverless Run subscription fail due to use of "any" http method


I’m testing out the Serverless run command for local simulation, but I keep getting the following error:

Error --------------------------------------------------

Failed to configure the Event Gateway. Failed to configure the Event Gateway. Failed to subscribe the event http to the function Serverless-Test-Function1 due the error: Subscription doesn’t validate. Validation error: “Key: ‘Subscription.Method’ Error:Field validation for ‘Method’ failed on the ‘eq=GET|eq=POST|eq=DELETE|eq=PUT|eq=PATCH|eq=HEAD|eq=OPTIONS’ tag”

I believe it is because in my serverless.yml file I specify the http method as “any” rather than using the specific GET, POST, DELETE options. Does anyone know the best way to add “any” to the list list of validation options, or where this validation is performed within the Serverless codebase so I can disable it?


1 Like

I’m having this issue following the serverless-http example too. Did anyone find a solution?

any should be ok. Can you paste your config here?