{"id":13764160,"url":"https://github.com/soniah/awsenv","last_synced_at":"2025-03-23T18:31:23.157Z","repository":{"id":35942228,"uuid":"40230999","full_name":"soniah/awsenv","owner":"soniah","description":"AWS environment config loader","archived":false,"fork":false,"pushed_at":"2018-07-17T14:05:46.000Z","size":18,"stargazers_count":35,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T22:36:01.358Z","etag":null,"topics":["go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soniah.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":"2015-08-05T07:21:24.000Z","updated_at":"2024-11-29T13:19:47.000Z","dependencies_parsed_at":"2022-09-01T07:50:13.668Z","dependency_job_id":null,"html_url":"https://github.com/soniah/awsenv","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soniah%2Fawsenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soniah%2Fawsenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soniah%2Fawsenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soniah%2Fawsenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soniah","download_url":"https://codeload.github.com/soniah/awsenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245149224,"owners_count":20568851,"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":["go","golang"],"created_at":"2024-08-03T15:01:17.130Z","updated_at":"2025-03-23T18:31:22.741Z","avatar_url":"https://github.com/soniah.png","language":"Go","funding_links":[],"categories":["Software Packages","软件包","DevOps Tools","Go Tools","Go 工具","軟件包"],"sub_categories":["DevOps Tools","devops 工具","DevOps 工具","代码分析","Contents","DevOps工具"],"readme":"# awsenv\n\nAWS environment config loader.\n\n__awsenv__ is a small binary that loads AWS environment variables for an\nAWS profile from __~/.aws/credentials__ - useful if you're regularly\nswitching credentials and using tools like\n[Vagrant](https://www.vagrantup.com/). In addition to\n`aws_access_key_id` and `aws_secret_access_key`, it will also\noptionally load settings for `aws_keyname` and `aws_keypath`.\n\n# Installation\n\n\n```shell\n# install Go from https://golang.org/dl/\nexport GOPATH=$HOME/go\ngo get -u github.com/soniah/awsenv\n```\n\nThis will automatically download, compile and install the `awsenv` executable\nto `$GOPATH/bin`.\n\n# Usage\n\nImport variables into your environment by **eval**-ing a backticked call to\n**awsenv**.\n\n```shell\neval `awsenv profile-name`\n```\n\nFor example, if you had the following credential files:\n\n```shell\n% cat ~/.aws/credentials\n[example1]\naws_access_key_id = DEADBEEFDEADBEEF\naws_secret_access_key = DEADBEEFDEADBEEF1vzfgefDEADBEEFDEADBEEF\n\n% cat /var/tmp/credentials\n[example2]\naws_access_key_id = DEADBEEFDEADBEEF\naws_secret_access_key = DEADBEEFDEADBEEF1vzfgefDEADBEEFDEADBEEF\naws_keyname = 'example2_key'\naws_keypath = \"~/.ssh/example2.pem\"\n```\n\nThe following shell commands would import AWS variables into your\nenvironment:\n\n```shell\n% eval `awsenv example1`\n% env | grep AWS\nAWS_ACCESS_KEY_ID=DEADBEEFDEADBEEF\nAWS_SECRET_ACCESS_KEY=DEADBEEFDEADBEEF1vzfgefDEADBEEFDEADBEEF\n\n% eval `awsenv example2 -f /var/tmp/credentials -v`\nAWS_ACCESS_KEY_ID=DEADBEEFDEADBEEF\nAWS_SECRET_ACCESS_KEY=DEADBEEFDEADBEEF1vzfgefDEADBEEFDEADBEEF\nAWS_KEYNAME=example2_key\nAWS_KEYPATH=/Users/sonia/.ssh/example2.pem\n```\n# Vagrant Example\n\nIn a **Vagrantfile** you could do:\n\n```ruby\noverride.ssh.username = \"ubuntu\"\naws.keypair_name = ENV['AWS_KEYNAME']\noverride.ssh.private_key_path = ENV['AWS_KEYPATH']\n```\n# Flags\n\nThe accepted flags can be displayed using `-h`:\n\n```\n% awsenv -h\nUsage:\n  awsenv [OPTIONS] Profile\n\nApplication Options:\n  -v, --verbose   Verbose output\n  -f, --filename= Credentials file (~/.aws/credentials)\n\nHelp Options:\n  -h, --help      Show this help message\n\nArguments:\n  Profile\n```\n\n# Contributions\n\nContributions are welcome; here is an example workflow using [hub](https://github.com/github/hub).\n\n1. `go get github.com/soniah/awsenv`\n1. `cd $GOPATH/src/github.com/soniah/awsenv`\n1. `hub fork`\n1. `git co -b dev` (and write some code)\n1. `git push -u \u003cyour-github-username\u003e dev`\n1. `hub pull-request`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoniah%2Fawsenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoniah%2Fawsenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoniah%2Fawsenv/lists"}