As far as I know the only way to set environment variables to elastic beanstalk is either:
eb setenv
command.I have a .env
file in my project that contains all of my environment variables over 100 variables and I'm looking for a way to push them all to the eb instance at the same time.
First off, you should note that Elastic Beanstalk has a limit of fifty (50) environment variables per environment.
Now, if you've got a bunch of environment variables set in a .env file, an easy way to set them en-mass is to just dump them all into the eb setenv command like this...
eb setenv `cat .env | sed '/^#/ d' | sed '/^$/ d'`
This will set them all in one shot and save you spending all night on the aws console page. The sed
command remove commented lines and new lines.
Explain Shell
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With