Skip to content

Instantly share code, notes, and snippets.

@dtenenba
Last active March 12, 2017 19:01
Show Gist options
  • Save dtenenba/f695a6ddd29fbe900a440773083563a7 to your computer and use it in GitHub Desktop.
Save dtenenba/f695a6ddd29fbe900a440773083563a7 to your computer and use it in GitHub Desktop.

Python Serverless Microframework for AWS (PSMA) and Zappa comparison

PSMA was just announced. Zappa has been around for a while.

Both are ways to deploy serverless web apps using AWS API Gateway and AWS Lambda, a process which is tedious if done manually.

It seems that PSMA is based on many of the ideas in Zappa.

Frameworks

PSMA provides a framework (Chalice) that is like Flask but is not actually Flask. Zappa lets you use Flask or any other WSGI-compatible framework.

Non-standard dependencies

With PSMA (I believe but I am not sure) you set up a virtualenv and any dependencies in that virtualenv will automatically be included.

With Zappa, any non-standard (that is, containing native C/C++ code) packages need to be added to the lambda-packages project.

Output types

With PSMA as of now you can only output json.

With Zappa you can output any content type, since you can use Flask and do whatever Flask can do.

My app (the trigger to be called by a BaseSpace app to start off a GeMS typing run) needs to output HTML (or at least an http redirect) so at present I cannot use PSMA because of this.

Overall

PSMA is brand new and is not yet meant to be used in production. Zappa is more mature and has lots of nice features.

For Zappa, the hoops to jump through to use non-standard dependencies are a little annoying, but otherwise it seems nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment