Skip to content

Instantly share code, notes, and snippets.

@r115
Last active March 21, 2024 15:51
Show Gist options
  • Save r115/3c78e54af4c8da75a7650a0cf170a315 to your computer and use it in GitHub Desktop.
Save r115/3c78e54af4c8da75a7650a0cf170a315 to your computer and use it in GitHub Desktop.
Aws Parameter Store To System Environment Variable
aws ssm get-parameters-by-path \
--path /apps/prod --region us-east-1 \
| jq '.Parameters[] |.Name, .Value' \
| xargs -n2 -d'\n' | tr -s '[:blank:]' '=' \
| sed 's/"//g' \
| sed 's@.*/@@' \
| sed 's/^/export /' > \
| sudo tee /etc/profile.d/my_envs.sh
@r115
Copy link
Author

r115 commented Mar 21, 2024

Stackoverflow-fu

Not anywhere near efficient but it delivers

Tested on AmazonLinux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment