Skip to content

Instantly share code, notes, and snippets.

@la-mar
Last active December 12, 2019 20:48
Show Gist options
  • Save la-mar/69f31a8350914f9972a3030869c7e4a5 to your computer and use it in GitHub Desktop.
Save la-mar/69f31a8350914f9972a3030869c7e4a5 to your computer and use it in GitHub Desktop.
Chamber: Update SSM environment variables using a local dotenv file
# Update SSM environment variables using a local dotenv file (.env.production by default)
# Note: `chamber import` doesn't convert keys to lowercase, so that is handled in Python
python3 -c 'import json, os, dotenv; values={k.lower():v for k,v in dotenv.dotenv_values(".env.production").items()}; print(json.dumps(values))' | jq | aws-vault exec ${ENV} -- chamber import ihs -
# more about chamber: https://github.com/segmentio/chamber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment