Manage AWS Credentials
Switch branches/tags
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd fixup! Add status command May 10, 2017
core Correcting import paths May 6, 2017
.travis.yml fixup! Add travis.yml May 10, 2017
LICENSE Initial rewrite May 5, 2017
README.md Move install instructions down May 10, 2017
awscm.sh Initial rewrite May 5, 2017
main.go Correcting import paths May 6, 2017

README.md

awscm

AWS Credentials Manager, a cli tool for switching AWS profiles.

Example

Accidentally run aws-cli command in the incorrect account:

$ 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:

$ awscm ls
home
work

Switch accounts and rerun command:

$ 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 (macOS only):

$ brew install jamesroutley/tap/awscm
$ awscm init >> ~/.bashrc  # or ~/.zshrc

Install with go get (requires go >= 1.8):

$ go get github.com/jamesroutley/awscm
$ awscm init >> ~/.bashrc  # or ~/.zshrc