1

I would like to add environment variables to any machine that'll be deployed using my Elastic-Beanstalk profile.

How can I do that? I'm looking for straight forward way.

Thanks.

steamer25
  • 9,278
  • 1
  • 33
  • 38
johni
  • 5,342
  • 6
  • 42
  • 70
  • Possible duplicate of [How do you pass custom environment variable on Amazon Elastic Beanstalk (AWS EBS)?](https://stackoverflow.com/questions/11211007/how-do-you-pass-custom-environment-variable-on-amazon-elastic-beanstalk-aws-ebs) – Nathron Jun 07 '17 at 17:39

1 Answers1

1

There are a few different ways to set environment variables in Elastic Beanstalk EC2 instances.

First you can do it from the AWS console in Configuration → Software Configuration.

You can also create and set them from the CLI during creating of your environment. You can read more about here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-configuration-methods-during.html

You can also set them with the CLI like this:

eb setenv key=value

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-setenv.html

Another way is to set it in your .ebextensions/config file. This example is from a Django project.

option_settings:
  WSGIPath: "project/wsgi.py"
Gustaf
  • 1,299
  • 8
  • 16