您如何在 Amazon Elastic Beanstalk (AWS EBS) 上传递自定义环境变量? [英] How do you pass custom environment variable on Amazon Elastic Beanstalk (AWS EBS)?

查看:28
本文介绍了您如何在 Amazon Elastic Beanstalk (AWS EBS) 上传递自定义环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亚马逊 Elastic Beanstalk 简介说:

<块引用>

Elastic Beanstalk 可让您打开引擎盖"并保留完全控制权……甚至可以通过 Elastic Beanstalk 控制台传递环境变量.

中一样在 .ebextensions 中创建变量仍然有效.

它甚至可以是更可取的,例如如果您稍后将部署到另一个环境并且害怕忘记手动设置它们,或者您可以将值提交给源代码管理.我混合使用两者.

The Amazon Elastic Beanstalk blurb says:

Elastic Beanstalk lets you "open the hood" and retain full control ... even pass environment variables through the Elastic Beanstalk console.

http://aws.amazon.com/elasticbeanstalk/

How to pass other environment variables besides the one in the Elastic Beanstalk configuration?

解决方案

As a heads up to anyone who uses the .ebextensions/*.config way: nowadays you can add, edit and remove environment variables in the Elastic Beanstalk web interface.

The variables are under Configuration → Software Configuration:

Creating the vars in .ebextensions like in Onema's answer still works.

It can even be preferable, e.g. if you will deploy to another environment later and are afraid of forgetting to manually set them, or if you are ok with committing the values to source control. I use a mix of both.

这篇关于您如何在 Amazon Elastic Beanstalk (AWS EBS) 上传递自定义环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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