Skip to content

Instantly share code, notes, and snippets.

@DeRain
Created November 27, 2017 16:55
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save DeRain/93c06d05cbd51eb1e6d64cd50f988c8d to your computer and use it in GitHub Desktop.
Save DeRain/93c06d05cbd51eb1e6d64cd50f988c8d to your computer and use it in GitHub Desktop.
Generate .env file from AWS Parameters Store
#Add ENV strings into AWS Parameter Store (as one parameter). All strings will be separated by the newline
#We are getting ENV string separated by the newline and pub them in the dotenv
aws ssm get-parameter --name Param-with-env --region eu-west-1 --query Parameter.Value | sed -e 's/^"//' -e 's/"$//' | awk '{gsub(/\\n/,"\n")}1' >> .env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment