https://github.com/jamesroutley/awscm
Manage AWS Credentials
https://github.com/jamesroutley/awscm
aws aws-cli aws-sdk
Last synced: about 1 year ago
JSON representation
Manage AWS Credentials
- Host: GitHub
- URL: https://github.com/jamesroutley/awscm
- Owner: jamesroutley
- License: apache-2.0
- Created: 2016-03-01T13:05:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T12:44:39.000Z (about 9 years ago)
- Last Synced: 2024-06-20T17:35:48.098Z (about 2 years ago)
- Topics: aws, aws-cli, aws-sdk
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# awscm
AWS Credentials Manager, a cli tool for switching AWS profiles.
## Example
Accidentally run `aws-cli` command in the incorrect account:
```shell
$ aws ec2 describe-instances --instance-id i-xxxxxx
An error occurred (UnauthorizedOperation) when calling the DescribeInstances operation: You are not authorized to perform this operation.
```
List available profiles:
```shell
$ awscm ls
home
work
```
Switch accounts and rerun command:
```shell
$ awscm use work
$ aws ec2 describe-instances --instance-id i-0a6d8ff0f31xxxxxx
{
"Reservations": [
// Output truncated
]
}
```
## API
```
$ awscm
awscm is a tool for setting an AWS profile to use.
Usage:
awscm [command]
Available Commands:
help Help about any command
init print installation instructions
ls List available AWS profiles
output use switches to an AWS output format
region use switches to an AWS region
status Show current settings
use use switches to an AWS profile
Flags:
-h, --help help for awscm
Use "awscm [command] --help" for more information about a command.
```
## Install
Install with [Homebrew](https://brew.sh/) (macOS only):
```shell
$ brew install jamesroutley/tap/awscm
$ awscm init >> ~/.bashrc # or ~/.zshrc
```
Install with `go get` (requires `go >= 1.8`):
```shell
$ go get github.com/jamesroutley/awscm
$ awscm init >> ~/.bashrc # or ~/.zshrc
```