Is there a bash command I can run to copy all the environment variables from one AWS Elastic Beanstalk environment to another? I’m trying to copy to a new environment, so assume that the target environment has no environment variables that need removing.
I’m aware of eb printenv
and eb setenv
, but these were not designed to work together.
2
Answers
You can string them together with a bit of bash magic:
If you prefer, you can create the following bash function:
Zag’s answer gave me the right idea, but didn’t quite work for me. Possibly because of a newer
ebcli
version. I have:The following function works with the above version: