Building Serverless Python Web Services with Zappa
上QQ阅读APP看书,第一时间看更新

Deploying and testing hello world

Zappa deployment is super easy, as you only need to run a single command in order start the deployment:

$ zappa deploy <stage_name>

That's it! We are done with deployment. Now, let's deploy the hello world program. The following screenshot describes the deployment process:

Once the deployment completes, we get the API URL endpoint. Let's test the hello world application by hitting the API URL with the /hello endpoint:

$ curl -l  https://071h4br4e0.execute-api.ap-south-1.amazonaws.com/dev/hello

After running the preceding command, you will see the following output:

Hello World!

It's really amazing to be able to configure the service and deploy it in a few seconds. Now, we will see its basic uses related to the zappa_settings.json file in detail.