"Value 'ANY {proxy+}' does not satisfy pattern" warning with sls 2.6


I while ago, I followed this guide on the Serverless blog to set up an API using Express on Lambda. In particular, I used this snippet so that API Gateway just forwards a request to any route to the lambda:

    handler: index.handler
      - http: ANY /
      - http: 'ANY {proxy+}'

It’s been working great… until the latest Serverless 2.6.0 update. Now I get a warning:

Configuration warning at ‘functions.myfunction.events[1].http’: value ‘ANY {proxy+}’ does not satisfy pattern /^(?:*|(GET|POST|PUT|PATCH|OPTIONS|HEAD|DELETE|ANY) (/\S*))$/i

Seeing the changelog, obviously this was caused by this change https://github.com/serverless/serverless/issues/8301

Should I change my configuration (and if so, how?), or should I report this as a bug/regression?

Thank you


yea what’s going on here. all broken now …

1 Like

Bump. I’m also wondering about this…

1 Like

I guess it might be time I fill a proper bug report :eyes:

same for me with version 2.8. Did you do a bug report? I searched github but I didn’t found it

1 Like

It should be ANY /{proxy+} now. You need an extra “/” before the proxy bit.

You can verify their regex on a regex tester https://regex101.com/r/XD0RQ0/1


Thanks, it worked :slight_smile:

1 Like

Thank you, it worked very fine for me