{"id":37123437,"url":"https://github.com/finatext/ssmenv-go","last_synced_at":"2026-01-14T14:15:14.881Z","repository":{"id":256712175,"uuid":"856194519","full_name":"Finatext/ssmenv-go","owner":"Finatext","description":"ssmenv provides a way to replace environment variables with AWS Systems Manager Parameter Store values.","archived":false,"fork":false,"pushed_at":"2025-12-16T03:05:27.000Z","size":112,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T13:53:42.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Finatext.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-12T06:44:52.000Z","updated_at":"2025-12-16T03:05:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e1fb56d-c4f5-4d58-b32c-af7d2805c7a3","html_url":"https://github.com/Finatext/ssmenv-go","commit_stats":null,"previous_names":["finatext/ssmenv-go"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Finatext/ssmenv-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finatext%2Fssmenv-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finatext%2Fssmenv-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finatext%2Fssmenv-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finatext%2Fssmenv-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Finatext","download_url":"https://codeload.github.com/Finatext/ssmenv-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finatext%2Fssmenv-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28422440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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-14T14:15:14.187Z","updated_at":"2026-01-14T14:15:14.867Z","avatar_url":"https://github.com/Finatext.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssmenv-go\n[![Go Reference](https://pkg.go.dev/badge/github.com/Finatext/ssmenv-go.svg)](https://pkg.go.dev/github.com/Finatext/ssmenv-go)\n\nssmenv-go provides a way to replace environment variables with AWS Systems Manager Parameter Store values.\n\nIf the value of an environment variable begins with `ssm://`, it will be replaced by the corresponding SSM parameter value.\nIf no environment variable starts with `ssm://`, no API calls are made, and the original environment variables are returned unchanged.\n\nIn the following example, ssmenv-go fetches the value stored under the `/some_parameter/path` key, and the returned map will contain the fetched value instead of the original key.\n\n```go\nos.Setenv(\"SOME_ENV\", \"ssm:///some_parameter/path\")\n\nawsConfig, err := awsconfig.LoadDefaultConfig(ctx)\nif err != nil {\n  return errors.Wrap(err, \"failed to load AWS config\")\n}\nssmClient := ssm.NewFromConfig(awsConfig)\nreplacedEnv, err := ssmenv.ReplacedEnv(ctx, ssmClient, os.Environ())\n```\n\nThe complete code is available at https://github.com/Finatext/belldog/blob/main/cmd/lambda/lambda.go\n\nUse the returned `os.Environ()` compatible slice with tools like envconfig. An example with [env](https://github.com/caarlos0/env) package:\n\n```go\nreplacedEnv, err := ssmenv.ReplacedEnv(ctx, ssmClient, os.Environ())\nif err != nil {\n  return errors.Wrap(err, \"failed to fetch replaced env\")\n}\nconfig, err := env.ParseAsWithOptions[appconfig.Config](env.Options{\n  Environment: replacedEnv,\n})\nif err != nil {\n  return errors.Wrap(err, \"failed to process config from env\")\n}\n```\n\n## IAM permissions\nssmenv-go uses `ssm:GetParameters` operation.\n\n## Acknowledgements\nThe approach of replacing environment variable values that start with the `ssm://` format was inspired by [remind101/ssm-env](https://github.com/remind101/ssm-env).\n\nThe approach used by ssmenv-go (this library) differs from ssm-env in that it avoids passing secrets through environment variables, as this is generally not considered a best practice for security. Environment variables can sometimes be exposed in logs, error messages, or system dumps, so it's safer to handle sensitive data directly within the application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinatext%2Fssmenv-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinatext%2Fssmenv-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinatext%2Fssmenv-go/lists"}