Skip to content

Instantly share code, notes, and snippets.

@detelin
Last active October 19, 2017 08:27
Show Gist options
  • Save detelin/c8381967d195e2d89702ef335a2c633a to your computer and use it in GitHub Desktop.
Save detelin/c8381967d195e2d89702ef335a2c633a to your computer and use it in GitHub Desktop.
AWS: Copy Elastic Beanstalk environment variables to NGINX config
/opt/elasticbeanstalk/bin/get-config environment | python -c 'import json,sys;obj=json.load(sys.stdin);open("/etc/nginx/nginx_environment_variables", "wb").write("\n".join(["set $%s \"%s\";" % (key, obj[key]) for key in obj]));'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment