Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/147.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 使用github和Elastic Beanstalk确保配置文件的安全?_Amazon Web Services_Github_Passwords_Config_Amazon Elastic Beanstalk - Fatal编程技术网

Amazon web services 使用github和Elastic Beanstalk确保配置文件的安全?

Amazon web services 使用github和Elastic Beanstalk确保配置文件的安全?,amazon-web-services,github,passwords,config,amazon-elastic-beanstalk,Amazon Web Services,Github,Passwords,Config,Amazon Elastic Beanstalk,我正在使用github(public)跟踪我的web应用程序,并准备将其部署到Elastic Beanstalk。有没有一个好的方法来保证我的配置文件的安全,它有RDS用户名/密码?我必须将文件添加到git,以便将其推送到Elastic Beanstalk,但这将使我的密码对github上的每个人都可见。。。?有什么建议吗?谢谢 你的直觉是正确的!绝对不要让您的密钥/密码/凭据出现在您提交的代码库中 Elastic Beanstalk在控制面板中为此目的提供了环境变量。官方文件可在此处找到: 这

我正在使用github(public)跟踪我的web应用程序,并准备将其部署到Elastic Beanstalk。有没有一个好的方法来保证我的配置文件的安全,它有RDS用户名/密码?我必须将文件添加到git,以便将其推送到Elastic Beanstalk,但这将使我的密码对github上的每个人都可见。。。?有什么建议吗?谢谢

你的直觉是正确的!绝对不要让您的密钥/密码/凭据出现在您提交的代码库中

Elastic Beanstalk在控制面板中为此目的提供了环境变量。官方文件可在此处找到:

这些环境变量可以通过Elastic Beanstalk UI进行编辑


然后,您可以在
.yml
配置文件中引用这些变量,例如
密码:

将它们存储在环境变量中;不要在回购协议中硬编码。特别是不熟悉Elastic Beanstalk,但这类平台通常为他们提供一些配置接口,例如。@Rufflewind谢谢!知道了。看起来我需要通读python应用程序的这两个官方文档。和。非常感谢你@用户3128336您还可以使用CLI
eb setenv
或在创建期间
eb create--envvars
@nick humrich OK great!感谢您的建议,我可以通过在eb上添加env变量并像os.environ['DB_PASSWORD']一样访问它们来做到这一点。谢谢大家!