{"id":21010598,"url":"https://github.com/geoffdutton/aws-profile-manager","last_synced_at":"2025-10-07T20:11:26.276Z","repository":{"id":35126903,"uuid":"209930663","full_name":"geoffdutton/aws-profile-manager","owner":"geoffdutton","description":"Quickly and easily switch between AWS profiles","archived":false,"fork":false,"pushed_at":"2023-01-04T11:00:11.000Z","size":999,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T23:47:58.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/geoffdutton.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":"2019-09-21T05:33:42.000Z","updated_at":"2023-07-26T01:07:48.000Z","dependencies_parsed_at":"2023-01-15T14:21:58.158Z","dependency_job_id":null,"html_url":"https://github.com/geoffdutton/aws-profile-manager","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Faws-profile-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Faws-profile-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Faws-profile-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Faws-profile-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoffdutton","download_url":"https://codeload.github.com/geoffdutton/aws-profile-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243437541,"owners_count":20290857,"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":[],"created_at":"2024-11-19T09:21:37.239Z","updated_at":"2025-10-07T20:11:21.233Z","avatar_url":"https://github.com/geoffdutton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-profile-manager\n![npm](https://img.shields.io/npm/v/awsprof)\n![David](https://img.shields.io/david/geoffdutton/aws-profile-manager)\n[![CircleCI](https://circleci.com/gh/geoffdutton/aws-profile-manager.svg?style=svg)](https://circleci.com/gh/geoffdutton/aws-profile-manager)\n[![codecov](https://codecov.io/gh/geoffdutton/aws-profile-manager/branch/master/graph/badge.svg)](https://codecov.io/gh/geoffdutton/aws-profile-manager)\n[![Greenkeeper badge](https://badges.greenkeeper.io/geoffdutton/aws-profile-manager.svg)](https://greenkeeper.io/)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3201/badge)](https://bestpractices.coreinfrastructure.org/projects/3201)\n\nQuickly and easily switch between AWS profiles\n\n## Motivation\nI wanted something similar to [nvm](https://github.com/nvm-sh/nvm) or [rvm](https://rvm.io/) to manage and set my `AWS_PROFILE` environment variouable based on the directory I'm in.\n\n## Overview\nThe first proof of concept uses a centralized JSON file to keep track of what profiles to use for which directories in `.aws-profile-manager/config.json` rather than relying on some sort of dot RC file per project.\n\nCurrently, this doesn't actually export any environment variables, as I'm still trying to figure out the best way to do that. \n\nImportant note: this profile manager doesn't modify your `~/.aws/credentials` file, and only parses the aws creds file locally to present options to the user.\n\n## Usage\nFirst thing, install it globally:\n```bash\ngit -c advice.detachedHead=false clone https://github.com/geoffdutton/aws-profile-manager.git --quiet -b v1.0.0 --depth=1 ~/.awsprof\ncd ~/.awsprof \u0026\u0026 npm install\n\n```\n\nThen add this to `.bash_profile`:\n```bash\nexport AWSPROF_INSTALL_DIR=\"$HOME/.awsprof\"\n[[ -f \"$AWSPROF_INSTALL_DIR/awsprof.sh\" ]] \u0026\u0026 \\. \"$AWSPROF_INSTALL_DIR/awsprof.sh\"\n```\n\nAnd open a new terminal.\n\nThen move to your project directory and save a profile:\n```bash\n$ cd ~/Projects/my-awesome-project\n$ awsprof use\nNo profile set for ~/Projects/my-awesome-project\nChose a profile to use:\n1)  default\n2)  myStartup\n```\n\nNow you can see the export command to run when you're in that project directory:\n```bash\n$ cd ~/Projects/my-awesome-project\n$ awsprof use\nAWS_PROFILE=default\n```\n\nYou can verify it exported the `AWS_PROFILE` environment variable:\n```bash\n$ awsprof\nCurrent Env\nAWS_PROFILE=default\n```\n\nFinally, you can reset it to be prompted again:\n```bash\n$ cd ~/Projects/my-awesome-project\n$ awsprof reset\nRemoved stored profile for ~/Projects/my-awesome-project\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoffdutton%2Faws-profile-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoffdutton%2Faws-profile-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoffdutton%2Faws-profile-manager/lists"}