<div dir="ltr">Hi there!<div><br></div><div>To be honest, I didn't have time to read all your email... but your idea looks like the Chalice Microframework.</div><div>You can read more about it <a href="https://chalice.readthedocs.io/en/latest/?badge=latest">here</a>.</div><div><br></div><div>PS: I'm sorry if I didn't fully understand your idea and gave you a generic answer. :p</div><div><br></div><div>Kind regards!</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 6, 2018 at 8:23 AM <<a href="mailto:mischa@mvstg.biz">mischa@mvstg.biz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hello all, I wanted to get feedback on a proposal for a flask extension to make writing AWS Lambda web applications and services with Flask easier.<div><br></div><div>AWS Lambdas are little zip files of code and dependencies that can be executed without any extra infrastructure and can be provided as HTTP services. </div><div><br></div><div>I've found that Flask is really great for making even complex lambdas, and can be nearly as easy to maintain and manage as say a Heroku application. Except they run for basically free and you don't have to worry about having hosts to run your application or scaling web servers. I wrote about my setup here <a href="https://spiegelmock.com/2018/09/06/serverless-python-web-applications-with-aws-lambda-and-flask/" target="_blank">https://spiegelmock.com/2018/09/06/serverless-python-web-applications-with-aws-lambda-and-flask/</a></div><div><br></div><div>I wrote a basic Flask service hooking into AWS SSM Parameter Store to provide encrypted secrets from AWS to the application, using aws-wsgi (<a href="https://pypi.org/project/aws-lambda-wsgi/" target="_blank">https://pypi.org/project/aws-lambda-wsgi/</a>) to bridge lambda http proxy requests and responses with WSGI, and a small bit of tooling to vendor the application dependencies because they need to be shipped in the zip bundle. Code demonstrating all of this can be found here - <a href="https://github.com/revmischa/qanda/" target="_blank">https://github.com/revmischa/qanda/</a>.</div><div>Local running and testing is handled by AWS SAM Local (<a href="https://github.com/awslabs/aws-sam-cli" target="_blank">https://github.com/awslabs/aws-sam-cli</a>). It uses flask-apispec with marshmallow to make serialization and swagger generation effortless.</div><div><br></div><div>The project I made with integrating flask and lambda is in my opinion quite smooth and makes writing a serverless Flask application as straightforward as any other app. What I want to do now is find a way to make this pattern reusable for myself and others, but it's not so clear to me how to approach this. I think the combination is a very powerful and useful one but I realized I could use some help in designing something opinionated yet reusable with the goal of making a new Flask-based lambda web service as fast and painless as possible.  </div><div>I took a crack at beginning to do this with <a href="https://github.com/revmischa/flask-serverless" target="_blank">https://github.com/revmischa/flask-serverless</a> but I'm open to different ideas. What I'd like is provide configuration via AWS SSM or lambda config vars, aws-wsgi bridge, a way to bundle dependencies along with the application, CORS, marshmallow, and apispec all in a neat little starter kit to make it possible to create little flask webserverlesses with minimal setup or copy/pasting.</div><div><br></div><div>There do exist some third-party projects like Zappa and Serverless that provide some of these pieces, but I am trying to see how far I can get with Flask and AWS' own tooling.</div><div><br></div><div>Thanks for your input!</div><div>Mischa</div></div>_______________________________________________<br>
Flask mailing list<br>
<a href="mailto:Flask@python.org" target="_blank">Flask@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/flask</a><br>
</blockquote></div>