7 ms·
API Gateway is the literal manifestation of the worst product I have ever had the misfortune of configuring. This is mostly due to AWS's incompetence at deliver
by dev1n 9y ago
API Gateway is the literal manifestation of the worst product I have ever had the misfortune of configuring. This is mostly due to AWS's incompetence at delivering any semblance of working documentation around the product. Looking forward to their new "open source" documentation.
- Shoothe 9y agoI can second this. I wanted to write a simple provisioning tool a while ago that sets up HTTP endpoint on API Gateway and forwards the call to Lambda and the process was extremely complicated.
- nzoschke 9y agoCheck out the Serverless Application Model (SAM): https://github.com/awslabs/serverless-application-model https://github.com/awslabs/serverless-application-model 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 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.
- dev1n 9y agoI have just finished up using SAM and it is miles better than trying to wire API Gateway and Lambda together. Setting up an authorizer with cognito took some time to find the right examples and get the swagger right but yes I am a fan of SAM. 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.