{"id":37219498,"url":"https://github.com/gametimesf/aws-ssm-env","last_synced_at":"2026-01-15T01:16:54.194Z","repository":{"id":31818767,"uuid":"128258071","full_name":"gametimesf/aws-ssm-env","owner":"gametimesf","description":"Simple utility to help export parameters from Amazon EC2 Systems Manager Parameter Store as environment variables","archived":false,"fork":true,"pushed_at":"2024-06-13T22:51:53.000Z","size":53,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-21T11:02:45.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jamietsao/aws-ssm-env","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gametimesf.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}},"created_at":"2018-04-05T20:03:28.000Z","updated_at":"2024-06-21T11:02:45.415Z","dependencies_parsed_at":"2023-02-16T11:45:38.350Z","dependency_job_id":null,"html_url":"https://github.com/gametimesf/aws-ssm-env","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/gametimesf/aws-ssm-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gametimesf%2Faws-ssm-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gametimesf%2Faws-ssm-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gametimesf%2Faws-ssm-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gametimesf%2Faws-ssm-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gametimesf","download_url":"https://codeload.github.com/gametimesf/aws-ssm-env/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gametimesf%2Faws-ssm-env/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"ssl_error","status_checked_at":"2026-01-15T00:55:20.945Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-15T01:16:53.614Z","updated_at":"2026-01-15T01:16:54.183Z","avatar_url":"https://github.com/gametimesf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-ssm-env\nSimple utility to print parameters from Amazon Systems Manager (ssm) Parameter Store as environment variables. This is useful for injecting secure secrets into the environment of a docker container process.\n\n### Usage\nCreate secret parameters on AWS Parameter Store for your application using [hierarchies](http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html#sysman-paramstore-su-organize):\n```\n\u003e aws ssm put-parameter --name /userservice/SECRET_1 --value \"123456\" --type SecureString\n\u003e aws ssm put-parameter --name /accountservice/secret_2 --value \"abcdef\" --type SecureString\n\u003e aws ssm put-parameter --name /accountservice/secret_3 --value \"foobarbaz\" --type SecureString\n\u003e aws ssm put-parameter --name /database/production/password --value \"productionpass\" --type SecureString\n\u003e aws ssm put-parameter --name /database/staging/password --value \"stagingpass\" --type SecureString\n```\nAdd tags to categorize parameters in various ways:\n```\n\u003e aws ssm add-tags-to-resource --resource-type Parameter --resource-id /userservice/SECRET_1 --tags Key=userservice,Value=true Key=production,Value=true\n\u003e aws ssm add-tags-to-resource --resource-type Parameter --resource-id /accountservice/secret_2 --tags Key=accountservice,Value=true Key=production,Value=true\n\u003e aws ssm add-tags-to-resource --resource-type Parameter --resource-id /accountservice/secret_3 --tags Key=accountservice,Value=true Key=staging,Value=true\n\u003e aws ssm add-tags-to-resource --resource-type Parameter --resource-id /database/production/password --tags Key=userservice,Value=true Key=accountservice,Value=true Key=production,Value=true\n\u003e aws ssm add-tags-to-resource --resource-type Parameter --resource-id /database/staging/password --tags Key=userservice,Value=true Key=accountservice,Value=true Key=staging,Value=true\n```\n\n#### Retrieve and print parameters with `aws-ssm-env`:\n\n*Notice that parameter names are automatically capitalized.*\n```\n# filter by tag: print 'userservice' parameters for 'production'\n\u003e AWS_REGION=\u003caws-region\u003e aws-ssm-env --tags=userservice,production\nSECRET_1=123456\nPASSWORD=productionpass\n\n# filter by tag: print 'accountservice' parameters for 'staging'\n\u003e AWS_REGION=\u003caws-region\u003e aws-ssm-env --tags=accountservice,staging\nSECRET_3=foobarbaz\nPASSWORD=stagingpass\n\n# filter by path: print all database parameters\n\u003e AWS_REGION=\u003caws-region\u003e aws-ssm-env --paths=/database\nPASSWORD=productionpass\nPASSWORD=stagingpass\n\n# filter by path and tag: print database parameters for 'production'\n\u003e AWS_REGION=\u003caws-region\u003e aws-ssm-env --paths=/database --tags=production\nPASSWORD=productionpass\n```\n\n**WARNING: Using `'/'` as a path (e.g. `--paths=/`) will recursively retrieve EVERY single parameter configured in Parameter Store.  This will increase the runtime of this script and could result in hitting SSM rate limits. Use of `'/'` as a path is highly discouraged.**\n\n\nUse `export` with `aws-ssm-env` to inject secrets from Parameter Store into the environment:\n```\n\u003e export $(AWS_REGION=\u003caws-region\u003e aws-ssm-env --tags=userservice,production)\n\u003e env\n...\n...\nSECRET_1=123456\nPASSWORD=productionpass\n```\n\n#### Setting parameters into environment from application code\nIf you have a need to set SSM parameters as environment variables directly from application code:\n```\n// retrieve database parameters for production and set each as env variables\nfetch.MustSetEnv([]string{\"/database\"}, []string{\"production\"}, true)\n```\n\n### Installation\ngo get:\n```\n\u003e go get github.com/gametimesf/aws-ssm-env\n```\nOr download [binary](https://github.com/gametimesf/aws-ssm-env/releases/latest):\n```\n\u003e wget -O aws-ssm-env.zip https://github.com/gametimesf/aws-ssm-env/releases/download/v2.0.3/aws-ssm-env-v2.0.3-linux-amd64.zip\n\u003e unzip aws-ssm-env.zip\n\u003e chmod 755 aws-ssm-env\n```\n\n**Note**: If you receive the following error: `unknown directive: toolchain`, you must first upgrade to Go 1.21 or higher.\n\n### Creating a new release\n\nSimply create a new tag and push it to the repository. The GitHub Actions workflow will automatically build and release the new version.\n\n```bash\ngit tag vX.X.X\ngit push --tags\n```\n\n### Author\nGametime Engineering\n\n### License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgametimesf%2Faws-ssm-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgametimesf%2Faws-ssm-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgametimesf%2Faws-ssm-env/lists"}