Building, testing, and deploying with Docker
To make a build for the deployment, we need to initialize Zappa using zappa init. This command generates an interactive questionnaire to configure the application. Once you configure Zappa, it will generate the zappa_settings.json file. The following is a code snippet of the zappa_settings.json file:
{
"dev": {
"app_function": "resources.api",
"aws_region": "ap-south-1",
"profile_name": "default",
"project_name": "chapter12",
"runtime": "python3.6",
"s3_bucket": "zappa-xl0doooe4"
}
}
Let's move ahead to make a build using Zappa without considering the Docker environment.
Building without Docker
Here we are going to consider the default generated zappa_settings. Now deploy the application using the Zappa deploy command. The following is a log snippet of the zappa deploy <stage_name> command:
$ zappa deploy dev Calling deploy for stage dev.. Creating chapter12-dev-ZappaLambdaExecutionRole...