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

Initial deployments

Once you are done with initializing Zappa, then you can deploy the application on to the production stage in a single command, as shown in the following code snippet:

$ zappa deploy production
.
.
.
Deployment complete ! https://071h4br4e0.execute-api.ap-south-1.amazonaws.com/production

When you call the $ zappa deploy command, Zappa performs some tasks to complete the deployment. The following is the internal flow and process of Zappa regarding deployment:

  1. Compress the application code in your local environment into a ZIP archive by replacing any dependencies with versions in a precompiled Lambda package.
  2. Set up the Lambda handler function with the required WSGI middleware based on your application's type.
  3. Upload the generated archive from the preceding two steps into the Amazon S3 bucket.
  4. Create and manage the necessary AWS IAM policies and roles.
  5. Creates the AWS Lambda function with reference to the uploaded ZIP archive file on the AWS S3 bucket.
  6. Create the AWS API Gateway resources along with the different stages as per Zappa configuration.
  7. Create the WSGI compatible routes for the API Gateway resources.
  8. Link the API Gateway routes to the AWS Lambda functions.
  9. Finally, remove the ZIP file from AWS S3.
Note: lambda-packages ( https://github.com/Miserlou/lambda-packages) is an open source repository that's maintained by the Zappa community. This repository contains the most essential Python libraries as precompiled binaries, which will be compatible with AWS Lambda.

This is how Zappa deals with the deployment process—It completes all of these tasks on its own and gives you the honor of deploying your application with a single command.

主站蜘蛛池模板: 云南省| 北辰区| 包头市| 南投县| 闵行区| 威远县| 泉州市| 安溪县| 玉门市| 勐海县| 潢川县| 余姚市| 潞城市| 田阳县| 三明市| 安阳市| 宜兴市| 北碚区| 北票市| 宜城市| 板桥市| 包头市| 台安县| 增城市| 中宁县| 大宁县| 武汉市| 安宁市| 黑水县| 龙陵县| 广昌县| 隆安县| 昭苏县| 临泽县| 晋州市| 榆中县| 旺苍县| 睢宁县| 赤峰市| 乃东县| 独山县|