johni
johni

Reputation: 5568

Add / Change environment variables on AWS elastic-beanstalk

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.

Upvotes: 1

Views: 3258

Answers (1)

Gustaf
Gustaf

Reputation: 1349

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"

Upvotes: 1

Related Questions