Boto3部署到Elastic-beanstalk不会读取配置文件 [英] Boto3 Deploy to Elastic-beanstalk not reading Config files

查看:85
本文介绍了Boto3部署到Elastic-beanstalk不会读取配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用boto3使用 create_environment 函数.我的配置文件位于.elasticbeanstalk文件夹中,但部署似乎并未使用它们.当我使用eb客户端部署相同的环境时,它完全可以按需运行.有什么建议吗?

I am using boto3 to deploy my environment to elastic beanstalk using the create_environment function. I have my configuration files in the .elasticbeanstalk folder but the deploy doesn't seem to be using them. When I deploy the same environment using the eb client it works exactly as wanted. Any suggestions?

推荐答案

我知道了.

boto3使用aws api,该API不读取配置文件,而是读取json配置选项(称为option_settings).这些使您可以配置所有您的EC2部署后设置(可以在Elastic beanstalk配置页面上进行的所有更改).

boto3 uses the aws api, which does not read the configuration files but rather reads a json configuration option (called option_settings). These allow you to configure all of your post-ec2-deploy settings (Everything you can change from the elastic beanstalk configuration page).

但是,如果您想针对应用程序运行前的ec2实例安装(例如,软件包安装,文件创建等)调整配置,则必须创建所需的ec2实例的aws映像,然后从option_settings中引用该图像ID.

However, if you want to adjust configuration for what your ec2 instance has installed before your application runs (things like package installs, file creation, etc.) then you will have to create an aws image of a ec2 instance you like, and then reference that image id from the option_settings.

很显然,eb客户端通过读取配置文件为您完成了上述所有操作.

obviously the eb client does all of the above for you by reading the configuration files.

这篇关于Boto3部署到Elastic-beanstalk不会读取配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆