Skip to content

Instantly share code, notes, and snippets.

@rdkls
Created July 26, 2018 08:34
Show Gist options
  • Save rdkls/2fd6276e143bce0b4e59be60953f01e3 to your computer and use it in GitHub Desktop.
Save rdkls/2fd6276e143bce0b4e59be60953f01e3 to your computer and use it in GitHub Desktop.
Get my region
export REGION=`curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region`
and get an ssm parameter value:
export POSTGRES_USER=`aws ssm get-parameter --name=$SSM_PARAMETER_NAME_DB_USERNAME --region=$REGION --with-decryption | jq -r .Parameter.Value`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment