{"id":19944510,"url":"https://github.com/runwayml/awssecret2env","last_synced_at":"2025-05-03T16:31:14.860Z","repository":{"id":64318626,"uuid":"275265249","full_name":"runwayml/awssecret2env","owner":"runwayml","description":"Convert secrets stored in AWS Secrets Manager to environment variables","archived":false,"fork":false,"pushed_at":"2023-01-18T14:53:06.000Z","size":71,"stargazers_count":47,"open_issues_count":0,"forks_count":8,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-07T18:11:50.292Z","etag":null,"topics":["aws","aws-secrets-manager","devops","environment-variables","golang","secrets-management"],"latest_commit_sha":null,"homepage":"","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/runwayml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-06-26T23:24:46.000Z","updated_at":"2025-03-06T02:47:56.000Z","dependencies_parsed_at":"2023-02-10T15:30:46.634Z","dependency_job_id":null,"html_url":"https://github.com/runwayml/awssecret2env","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwayml%2Fawssecret2env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwayml%2Fawssecret2env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwayml%2Fawssecret2env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwayml%2Fawssecret2env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runwayml","download_url":"https://codeload.github.com/runwayml/awssecret2env/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252216089,"owners_count":21713097,"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":["aws","aws-secrets-manager","devops","environment-variables","golang","secrets-management"],"created_at":"2024-11-13T00:21:15.415Z","updated_at":"2025-05-03T16:31:14.590Z","avatar_url":"https://github.com/runwayml.png","language":"Go","readme":"# `awssecret2env`\n\n[![CirclCI Build Status](https://circleci.com/gh/runwayml/awssecret2env.svg?style=shield)](https://app.circleci.com/pipelines/github/runwayml/awssecret2env)\n\nConvert secrets stored in AWS Secrets Manager to environment variables.\n\n## Example\n\nGiven a file like `secrets.txt` that maps environment variable names to secret names in AWS Secret Manager, `awssecret2env` replaces the secret names with their values stored in AWS, and prints the resulting env to `stdout`.\n\n```bash\n# secrets.txt\nDB_HOST=db/dev/DB_HOST\nDB_USER=db/dev/DB_USER\nDB_PASSWORD=db/dev/DB_PASSWORD\n```\n\n```bash\n# Usage: awssecret2env [OPTIONS] \u003cinput-file\u003e\nawssecret2env secrets.txt\n# DB_HOST=\u003cREDACTED\u003e\n# DB_USER=\u003cREDACTED\u003e\n# DB_PASSWORD=\u003cREDACTED\u003e\n```\n\nWith no options, `awssecret2env` prints the resulting environment variables to `stdout`. You can specify an output file with the `--output` flag, and optionally add an `export` statement to each line with `--export`.\n\n```bash\nawssecret2env --output .env --export secrets.txt\n\ncat .env\n# export DB_HOST=\u003cREDACTED\u003e\n# export DB_USER=\u003cREDACTED\u003e\n# export DB_PASSWORD=\u003cREDACTED\u003e\n\nsource .env\n# The env vars should now be injected in your shell\n```\n\n### Input File\n\nInput files are in the following format:\n\n```bash\n# lines beginning with \"#\" are ignored as a comment\nENV_VAR_NAME=secret-name/secret-key\nENV_VAR_NAME_2=secret-name/secret-key-2\nENV_VAR_NAME_3=other-secret-name/other-key\n```\n\nThe secret's key is always interpreted as the string following the last `/` character in the line.\n\n\u003e NOTE: Secret **names** may contain `/` characters, but secret **keys** SHOULD NOT.\n\n## Download\n\nDownloaded files must be made executable before they can be run.\n\n* [MacOS (Intel)](https://awssecret2env.s3.amazonaws.com/latest/awssecret2env-macos)\n* [MacOS (Apple Silicon)](https://awssecret2env.s3.amazonaws.com/latest/awssecret2env-macos-arm64)\n* [Windows](https://awssecret2env.s3.amazonaws.com/latest/awssecret2env-windows)\n* [Linux (X86_64)](https://awssecret2env.s3.amazonaws.com/latest/awssecret2env-linux64)\n* [Linux (ARM6)](https://awssecret2env.s3.amazonaws.com/latest/awssecret2env-linuxarm6)\n* [Linux (ARM7)](https://awssecret2env.s3.amazonaws.com/latest/awssecret2env-linuxarm7)\n\nYou can also download and execute `awssecret2env` programmatically.\n\n```bash\nPLATFORM=macos # supported platforms: \"macos\", \"macos-arm64\", \"windows\", \"linux64\", \"linuxarm6\", or \"linuxarm7\"\nVERSION=latest # supported versions: \"latest\", \"master\", \"v0.1.0\", etc.\n\nwget https://awssecret2env.s3.amazonaws.com/${VERSION}/awssecret2env-${PLATFORM}\nchmod +x awssecret2env-${PLATFORM}\nmv awssecret2env-${PLATFORM} /usr/local/bin/awssecret2env\n```\n\n## Usage\n\n```\nUsage: ./build/bin/awssecret2env [OPTIONS] \u003cinput-file\u003e ...\nNote: \u003cinput-file\u003e is a required positional argument.\n  -r, --aws-region string   The name of the AWS region where secrets are stored (default \"us-east-1\")\n  -e, --export              Prepends \"export\" statements in front of the output env variables\n  -h, --help                Show this screen\n  -o, --output string       Redirects output to a file instead of stdout\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunwayml%2Fawssecret2env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunwayml%2Fawssecret2env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunwayml%2Fawssecret2env/lists"}