I am not sure if 'Full Guide' in title of the article made me smiling or maybe it was recall of my experiences related to configuration of AWS Lambda and AWS API Gateway in CloudFormation. There is a lot of things which has not been mentioned in this article and it is what I am looking forward to - even trivial things which looks easy at the first glance, i.e.: * How to configure caching and caching rules - please no…
I'm using AWS SAM, which simplifies much, but couldn't setup CORS with it.
Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
21–30 of 43 posts
Re: Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
#22Alternately: ``` from flask import Flask app=Flask() @app.route(‘/‘) def hi(): return "Hi!” ``` $ pip install zappa $ zappa init $ zappa deploy $ zappa certify IAM, SSL, API Gateway, Lambda, all taken care of. We did the work so you don't have to.
Sure Zappa, keeps the “container-function-thing” alive so you can cache it as a global variable, but this is a jacket approach that I’m not clear enough on the consequences to use.
Re: Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
#23As a number of other comments have pointed out, there are packages that help with managing your infrastructure in code; which is critical outside of anything other than a play environment. Terraform, serverless, cloudformation, SAM, zappa, etc - are all essentially requirements for cloud usage.
At Amazon they’ve tooling which makes it relatively easy to set up an AWS account to develop against; the tool primarily configures the billing to the correct team within amazon. Additionally your manager gets “rights” to the account, IAM accounts can be linked to AD, etc, etc. This is all part of a push to get Amazon employees building infra on AWS proper. When you create the environment you have to denote whether it’s dev, or whether it’s production; in the former case it’s widely accepted that you use the GUI to set up your trial. However in the latter case you’re strongly encouraged to use something like cloudformation. It was always a shock to me that for prod accounts they don’t disable the GUI for anything other than viewing.
Re: Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
#24Alternately: ``` from flask import Flask app=Flask() @app.route(‘/‘) def hi(): return "Hi!” ``` $ pip install zappa $ zappa init $ zappa deploy $ zappa certify IAM, SSL, API Gateway, Lambda, all taken care of. We did the work so you don't have to.
Re: Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
#25Re: Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
#26Earlier quoted context omitted.
I'm using AWS SAM, which simplifies much, but couldn't setup CORS with it.
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-sa…
It allows you the SAM simplifications, but also all the CF stuff.
Re: Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
#27Alternately: ``` from flask import Flask app=Flask() @app.route(‘/‘) def hi(): return "Hi!” ``` $ pip install zappa $ zappa init $ zappa deploy $ zappa certify IAM, SSL, API Gateway, Lambda, all taken care of. We did the work so you don't have to.
If using NodeJS there is a very similar package to zappa called Serverless https://serverless.com/ One thing I would improve with the authors article is he crammed a giant conditional statement on the http-method inside his one function. Serverless makes it easy to bundle a single function per HTTP method and even share common code between them. You can build out a whole application as a single npm package. Bonuses i…
Are there any particular benefits to exporting and reimplementing all of that routing and organizational logic into instructions that "program" the API Gateway instead?
In this particular case, the API is solely for external consumption by a third party
Re: Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
#28Earlier quoted context omitted.
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-sa…
Isn't SAM just an extension of CloudFormation? It allows you the SAM simplifications, but also all the CF stuff.
[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...
Re: Full Guide to Developing REST API’s with AWS API Gateway and AWS Lambda
#29I have yet to deploy a production service with it, but the development experience has been positive.