Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save israelalagbe/84c6dbe9e51ae98101acf1457d51ab66 to your computer and use it in GitHub Desktop.
Save israelalagbe/84c6dbe9e51ae98101acf1457d51ab66 to your computer and use it in GitHub Desktop.

GET and Export all environment variables from elastic beanstalk

Bash Script

declare values="$(/opt/elasticbeanstalk/bin/get-config environment)"
for s in $(echo $values | jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" ); do
    export $s
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment