After my first steps with Lambda, Zappa and Flask I created some small applications to try various Zappa configuration options and play with some AWS services. Setting up the project got pretty boring after the second or third toy project. But for python developers there is a solution to automate these tasks – cookiecutter.
I created a cookiecutter template to easily and quickly create a new project, that can be deployed on AWS Lambda and uses Flask along with some other goodies. Checkout the README and the Pipfile.
Here is a short video that demostrates how to use cookiecutter-flask-lambda and create, deploy and undeploy a new project. It won’t get any easier to deploy your Flask based web application.
Zappa and Flask-S3 take care of all the heavy lifting of deploying to AWS Lambda. We can focus on creating the web application.
Image credit: Luke Loughead. Shared under the Creative Commons Attribution-ShareAlike 2.0 Generic license.
Update: After receiving some feedback, that it is not obvious if you need to use Python 2 or 3 for this article, I decided, that I want to update it all the way for Python 3. AWS Lambda supports it, Zappa supports it and we all want Python 3!
I wanted to try out AWS Lambda for a while now. But it took some time to find a reasonable development task that fits this infrastructure. Serverless deployment is very intriguing, escpecially for someone like me that doesn’t enjoy to fiddle with servers, operating systems and stuff.
No, I won’t reveal any detals about my project yet. But I want to share my experiences building a simple webapp – the good old hello world example – and deploy it on AWS Lambda.
Python 3.6 has been released just before Christmas. A great new release of my favorite programming language!
It includes some nice additions to the language: f-strings, asynchronous generators, asynchronous comprehensions, asyncio has been stabilized and a lot more.
Here are some handy links to get up to date with this new release.
Image credit: Quinn Dombrowski. Shared under the Creative Commons Attribution-ShareAlike 2.0 Generic license.
Honestly, Hammerspoon is an awesome tool to automate your macOS computer. It can react to system events, keyboard shortcuts and much more. Just have a look at its API and the Getting Started Guide. It is made for people that are not afraid to use an editor and code in the sweet programming language Lua. If you can code, it is more then sufficient to take a look at Learn Lua in Y Minutes to get a good grasp of Lua.
I could successfully replace 5 tools (Caffeine, Moom, Keyboard Maestro and Browserism) with a single script, that works much better and is way slimmer then these tools.
It’s the end of 2016 and I feel the strong urge to start a new blog. Recently, my life has changed significantly. I got seriously ill this summer. Of course my top priority is to completely recover until early 2017. But besides that I have a lot of time to spend on reading, researching, developing and writing about my favorite tech topics. So, this time the topic of the blog is strictly tech and nerd stuff. Nothing else! I also decided to write in English in order to strengthen my English writing skills. And apparently you have to deal with it.
So far I have planned some posts about Hammerspoon, machine learning and data science with Python, Cookiecutter for Django and some book reviews. We will see what I can accomplish.
Image credit: Mark Sebastian. Shared under the Creative Commons Attribution-ShareAlike 2.0 Generic license.