Re:Full Guide to Developing REST API’s with AWS API Gateway ...
by k__ on Monday May 14, 2018 @11:01AM
(#17066104)
I'm using AWS SAM, which simplifies much, but couldn't setup CORS with it.
[ Parent
| on HN ]
Re:Full Guide to Developing REST API’s with AWS API Gateway ...
by piotrkubisa on Monday May 14, 2018 @11:30AM
(#17066312)
I were using SAM for month or two and then switched back to CloudFormation, because I felt limited (not all features of API Gateway were implemented, duplicated stages, problems with instrict functions). However, I watch their GitHub repository for changes and I noticed many missing features are implemented on AWS re:invent basis (duration between next conference). The worth-noting feature of SAM is definetely aws-sam-cli (former: aws-sam-local) [1], which is a tool for developers to parse SAM template and invoke Lambda function in the docker on local machine. It was great to test simple APIs (start-api mode), but when some API started using custom authorizers or response was a compressed payload of png image it was not very helpful. Personally, I am working on a fork of aws-sam-cli to implement it to work with CloudFormation.
Re:Full Guide to Developing REST API’s with AWS API Gateway ...
by k__ on Monday May 14, 2018 @12:25PM
(#17066809)
Isn't SAM just an extension of CloudFormation?
It allows you the SAM simplifications, but also all the CF stuff.
Re:Full Guide to Developing REST API’s with AWS API Gateway ...
by piotrkubisa on Monday May 14, 2018 @12:50PM
(#17067042)
Yes, it adds a new custom types AWS::Serverless::* [1] and new Globals section [2] and it is really pleasant to work with for basic, not complicated API. It is transformed into CF template via samtranslator [3] (recently open-sourced) so it inherits a lot from CloudFormation but also that's why I encountered differences between SAM and CF types.
[1]: https://awslabs.github.io/serverless-application-model/inter...
[2]: https://awslabs.github.io/serverless-application-model/globa...
[3]: https://github.com/awslabs/serverless-application-model/tree...