For my functions events…I have many such endpoints defined…I was hoping if I could consolidate it into one handler in my node.js code…
handler: pages/router-build.router
events:
- http:
path: pages/{id}
method: get
cors: true
- http:
path: pages/{id}
method: post
cors: true
- http:
path: pages/name/{id}
method: any
cors: true
Is it possible to merge all above as single endpoint as below. If so, how would I handle in my Node.js lambda code…Can someone please guide…I am hittng the 200 max resources cloudformation limit & need to consolidate apis to handle this issue
Is this possibe
handler: pages/router-build.router
events:
- http:
path: pages/*
method: any
cors: true