官术网_书友最值得收藏!

Building, testing, and deploying a Python web service using Zappa

We are going to create a simple hello world program as a microservice using Python's Bottle framework. Let's follow some basic steps to configure a small project using the Bottle framework:

  1. First, we will create a new project directory named lambda_bottle_poc:
    $ mkdir lambda_bottle_poc
  2. Let's create a virtual environment inside the lambda_bottle_poc directory:
    $ virtualenv env -p python3.6
  3. Here is the basic hello world program using the Bottle framework:

Now it's time to deploy the program as serverless on AWS Lambda and expose the /hello API via API Gateway. In the previous chapter, we described the manual process to deploy the Python application, using AWS console and AWS CLI, which was a really big challenge.

But with the help of Zappa, all manual processes of the AWS console and AWS CLI are automated and provides a rapid process to deploy and maintain your application in a serverless environment.

主站蜘蛛池模板: 伽师县| 蒙阴县| 措勤县| 林口县| 蓝山县| 怀集县| 固镇县| 九台市| 长沙市| 潍坊市| 汉沽区| 迭部县| 高唐县| 洞头县| 库伦旗| 区。| 巩留县| 宾阳县| 黄浦区| 塘沽区| 蕉岭县| 乐都县| 白城市| 贵德县| 怀安县| 当阳市| 西宁市| 南丰县| 延长县| 周口市| 阳东县| 西乡县| 柞水县| 宁安市| 安庆市| 葫芦岛市| 余干县| 方城县| 浏阳市| 闸北区| 朝阳县|