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

The zappa_settings.json file

Once you've finished the questionnaire session, Zappa creates a basic zappa_settings.json file based on your input. zappa_settings.json plays an important role in configuring Zappa with your project. If you initialize Zappa in your existing project (Django/Flask/Pyramid/Bottle), then Zappa automatically detects the type of project and creates the zappa_settings.json file accordingly.

The following is the content of our newly created zappa_settings.json file for the hello world program:

{
"dev": {
"app_function": "hello.app",
"aws_region": "ap-south-1",
"profile_name": "default",
"project_name": "lambda-bottle-p",
"runtime": "python3.6",
"s3_bucket": "zappa-2o2zd8dg4"
}
}

For a Django project, it uses django_settings instead of app_function. django_settings needs to be initialized with the path to your Django settings:

{
"dev": {
"django_settings": "your_project.settings",
"aws_region": "ap-south-1",
"profile_name": "default",
"project_name": "lambda-bottle-p",
"runtime": "python3.6",
"s3_bucket": "zappa-2o2zd8dg4"
}
}

The preceding configuration is enough to deploy a basic Python web application. Let's move on and deploy hello world as a serverless application.

主站蜘蛛池模板: 杭锦旗| 克拉玛依市| 彭泽县| 福鼎市| 上思县| 阳谷县| 抚顺县| 大厂| 四川省| 周口市| 天长市| 格尔木市| 石城县| 卓尼县| 灌云县| 腾冲县| 莱西市| 百色市| 谢通门县| 兰考县| 荔波县| 桦南县| 隆安县| 垣曲县| 四川省| 共和县| 阳城县| 长葛市| 宜州市| 石屏县| 介休市| 灵寿县| 灌云县| 梁河县| 临汾市| 潢川县| 陕西省| 满洲里市| 铅山县| 宿州市| 土默特左旗|