by dev1n · 8y ago · 0 comments
All of the manual configuration of API gateway vanishes because it builds up an implicit API gateway from your functions and event mapping config.
You can see a boilerplate SAM config here: https://github.com/nzoschke/gofaas/blob/master/template.yml
I'm hacking on CORS today and with SAM it's 2 lines of config to add the allowed origins and methods.
While we're on the subject, Cloudformation could definitely use some work too. AWS, please tell me what line the template failed at. We had to use the swagger extensions to integrate cognito and those were failing because of indentation errors, but it just kept complaining about invalid swagger 2.0 definitions. That is just so gross.