Deploying with Zappa

To configure Zappa, you should run the zappa init command and follow the auto-generated questionnaire. I followed the default suggested settings, and so the following is the auto-generated zappa_settings.json file.

File—zappa_settings.json:

{    "dev": {        "app_function": "resources.api",        "profile_name": "default",        "project_name": "chapter11",        "runtime": "python3.6",        "s3_bucket": "zappa-ss0sm7k4r"    }}

That's it. Now, with the help of this configuration, you can perform the deployment as mentioned in the following log snippet:

$ zappa deploy devCalling deploy for stage dev..Creating chapter11-dev-ZappaLambdaExecutionRole IAM Role..Creating zappa-permissions policy on chapter11-dev-ZappaLambdaExecutionRole IAM Role.Downloading ...

Get Building Serverless Python Web Services with Zappa now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.