Skip to content

Commit

Permalink
Merge pull request #4 from notacoat/1.2.4
Browse files Browse the repository at this point in the history
v1.2.4
  • Loading branch information
notacoat authored Sep 9, 2020
2 parents 368034f + a36c7a1 commit 9331f9d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## aws-interactive-switch-profile

Utilizes `aws configure list-profiles` via [aws-cli](https://aws.amazon.com/cli/) to allow the switching of profiles using [Prompts](https://github.com/terkelg/prompts). No more remembering what your AWS profiles are called and typing export statements in terminal. Run the program via a helper shell function, select the profile you want to use and that's it.
Do you use multiple named AWS profiles and switch between them on a regular basis? Instead of
remembering what your profiles are called and the proper aws commands to type, this tool allows quick switching between profiles via an interactive menu that queries your profiles using the [AWS-CLI](https://aws.amazon.com/cli/). Run the program via a helper shell function, select the profile you want to use and that's it.

![aws-interactive-switch-profile demo](demo/demo.gif)
![aws-interactive-switch-profile demo](https://raw.githubusercontent.com/notacoat/project-media/master/aws-interactive-switch-profile.gif)

### Install

Expand Down
Binary file removed demo/demo.gif
Binary file not shown.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ function onError(e) {

async function checkAWS() {
await exec('aws --version', (error, _, stderr) => {
if(error) {
if (error) {
console.error('Please install AWS CLI.');
process.exit(1);
} else if (stderr) {
throw(stderr);
throw (stderr);
}
});
}

async function checkFile() {
const fileName = process.argv[2];
if (!fileName) {
throw('Please specify a temp file argument');
throw ('Please specify a temp file argument');
}
if (!fs.existsSync(fileName)) {
throw('The temp file does not exist.');
throw ('The temp file does not exist.');
}
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-interactive-switch-profile",
"version": "1.2.3",
"version": "1.2.4",
"description": "Switch between AWS profiles",
"author": "Emily Barbour",
"license": "MIT",
Expand Down

0 comments on commit 9331f9d

Please sign in to comment.