I need to use Amazon elastic beanstalk environment variable values for a local development but don't want them hard coded when I do a code push.
I'd like to run a bash script to set the variables, and this is how I do it with Heroku:
echo "... SETTING DATABASE_URL" export DATABASE_URL=$(heroku config:get DATABASE_URL) With elastic beanstalk, I can get a list of env variables with:
eb printenv <name of environment> I've tried grepping for just the value, e.g.
eb printenv my-environment | grep DB_NAME ... but that returns entire line and I just need value. So tried grepping with regex and it won't return anything, .e.g.
eb printenv my-environment | grep '/(?s)(?<=DB_NAME).+/' It's a simple regex query and checks out fine on regex101.com, so not sure what the problem could be.
Any ideas of how to get specific key values pairs?

