{"id":16893014,"url":"https://github.com/gmr/env-aws-params","last_synced_at":"2025-06-15T12:04:26.531Z","repository":{"id":27104319,"uuid":"112504904","full_name":"gmr/env-aws-params","owner":"gmr","description":"Inject AWS SSM Parameters as Environment Variables","archived":false,"fork":false,"pushed_at":"2023-07-28T13:45:50.000Z","size":52,"stargazers_count":88,"open_issues_count":7,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T19:17:40.021Z","etag":null,"topics":["12-factor","aws","docker","entrypoint","environment-variables","hacktoberfest","parameters","ssm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-29T17:15:25.000Z","updated_at":"2024-11-23T19:12:44.000Z","dependencies_parsed_at":"2024-06-18T22:48:00.390Z","dependency_job_id":null,"html_url":"https://github.com/gmr/env-aws-params","commit_stats":{"total_commits":71,"total_committers":8,"mean_commits":8.875,"dds":"0.23943661971830987","last_synced_commit":"963851fed9759af02b29606f030eb9b3b5111c2a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fenv-aws-params","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fenv-aws-params/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fenv-aws-params/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fenv-aws-params/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmr","download_url":"https://codeload.github.com/gmr/env-aws-params/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847061,"owners_count":20357317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["12-factor","aws","docker","entrypoint","environment-variables","hacktoberfest","parameters","ssm"],"created_at":"2024-10-13T17:13:15.682Z","updated_at":"2025-03-17T06:31:48.345Z","avatar_url":"https://github.com/gmr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# env-aws-params\n\n[![Build Status](https://travis-ci.org/gmr/env-aws-params.svg?branch=master)](https://travis-ci.org/gmr/env-aws-params)\n\n``env-aws-params`` is a tool that injects AWS EC2 Systems Manager (SSM)\n[Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html)\nKey / Value pairs as [Environment Variables](https://en.wikipedia.org/wiki/Environment_variable)\nwhen executing an application. It is intended to be used as a Docker\n[Entrypoint](https://docs.docker.com/engine/reference/builder/#entrypoint),\nbut can really be used to launch applications outside of Docker as well.\n\nThe primary goal is to provide a way of injecting environment variables for\n[12 Factor](https://12factor.net) applications that have their configuration defined\nin the SSM Parameter store. It was directly inspired by\n[envconsul](https://github.com/hashicorp/envconsul).\n\n## Example Usage\n\nCreate parameters in Parameter Store:\n```bash\naws ssm put-parameter --name /service-prefix/ENV_VAR1 --value example\naws ssm put-parameter --name /service-prefix/ENV_VAR2 --value test-value\n```\n\nThen use ``env-aws-params`` to have bash display the env vars it was called with:\n```bash\nenv-aws-params --prefix /service-prefix /bin/bash -c set\n```\n\nIf you want to include common and service specific values, ``--prefix`` can be specified\nmultiple times:\n```bash\nenv-aws-params --prefix /common /bin/bash -c set\n```\n\nTo get a plaintext output of your environment variables to use with other utilities, we can use `printenv`:\n```bash\nenv-aws-params --pristine --silent --prefix /service-prefix /usr/bin/printenv \u003e ~/some-file.sh\n```\nWhich will write your environment variables in plain text, for example:\n```bash\n# ~/some-file.sh Contents:\nENV_VAR1=example\nENV_VAR2=test-value\n```\n\n## CLI Options\n\n```\nNAME:\n   env-aws-params - Application entry-point that injects SSM Parameter Store values as Environment Variables\n\nUSAGE:\n   env-aws-params [global options] -p prefix command [command arguments]\n\nCOMMANDS:\n     help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --aws-region value        The AWS region to use for the Parameter Store API [$AWS_REGION]\n   --prefix value, -p value  Key prefix that is used to retrieve the environment variables - supports multiple use\n   --pristine                Only use values retrieved from Parameter Store, do not inherit the existing environment variables\n   --sanitize                Replace invalid characters in keys to underscores\n   --strip                   Strip invalid characters in keys\n   --upcase                  Force keys to uppercase\n   --debug                   Log additional debugging information [$PARAMS_DEBUG]\n   --silent                  Silence all logs [$PARAMS_SILENT]\n   --help, -h                show help\n   --version, -v             print the version\n```\n\n## Building\n\nThis project uses [go modules](https://go.dev/blog/using-go-modules). To build the project:\n\n```bash\ngo mod download\ngo mod verify\ngo build\n```\n\nBuilding an environment is also provided as a docker image based on Alpine Linux. See the Dockerfile for more information.\n\n```bash\ndocker build -t env-aws-params; # Build the image\ndocker run --rm -it -v $HOME/.aws/:/root/.aws/ env-aws-params [your options]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmr%2Fenv-aws-params","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmr%2Fenv-aws-params","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmr%2Fenv-aws-params/lists"}