aws-vault

command module
Version: v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2015 License: MIT Imports: 5 Imported by: 0

README

AWS Vault

Securely store and access credentials for AWS. AWS Vault stores IAM credentials in your operating systems secure keystore and then generates temporary credentials from those to expose to your shell and applications. It's designed to be complementary to the aws cli tools, and is aware of your configuration in ~/.aws/config.

Currently OSX and Keychain are supported, with support for Linux and Windows planned.

Usage


# make use of the default profile
$ aws-vault store
Enter Access Key Id: ABDCDEFDASDASF
Enter Secret Key: %

$ aws-vault exec env | grep AWS
AWS_DEFAULT_PROFILE=default
AWS_ACCESS_KEY_ID=asdasd
AWS_SECRET_ACCESS_KEY=aasdasdasda

# add an extra profile
$ aws-vault store --profile work
Enter Access Key Id: ABDCDEFDASDASF
Enter Secret Key: %

$ aws-vault exec --profile work env | grep AWS
AWS_DEFAULT_PROFILE=work
AWS_ACCESS_KEY_ID=asdasd
AWS_SECRET_ACCESS_KEY=aasdasdasda

Multi-Factor Authentication

First you'll need to setup an MFA token in the AWS Console.

Edit your ~/.aws/config to add the mfa_serial into either the default or a profile

[default]
region=us-east-1
mfa_serial = arn:aws:iam::123456789012:mfa/jonsmith

Test it out:

aws-vault exec aws iam get-user
Enter token code for "arn:aws:iam::123456789012:mfa/jonsmith": %
{
    "User": {
        "UserName": "jonsmith",
        "PasswordLastUsed": "2015-01-08T03:01:24Z",
        "CreateDate": "2011-06-13T23:32:35Z",
        "UserId": "AIDAAS545ABFI3NS",
        "Path": "/",
        "Arn": "arn:aws:iam::123456789012:user/jonsmith"
    }
}

References and Inspiration

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Directories

Path Synopsis
Godeps
_workspace/src/github.com/aws/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
Package aws provides core functionality for making requests to AWS services.
_workspace/src/github.com/aws/aws-sdk-go/aws/awserr
Package awserr represents API error interface accessors for the SDK.
Package awserr represents API error interface accessors for the SDK.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds
Package stscreds are credential Providers to retrieve STS AWS credentials.
Package stscreds are credential Providers to retrieve STS AWS credentials.
_workspace/src/github.com/aws/aws-sdk-go/service/sts
Package sts provides a client for AWS Security Token Service.
Package sts provides a client for AWS Security Token Service.
_workspace/src/github.com/aws/aws-sdk-go/service/sts/stsiface
Package stsiface provides an interface for the AWS Security Token Service.
Package stsiface provides an interface for the AWS Security Token Service.
_workspace/src/github.com/vaughan0/go-ini
Package ini provides functions for parsing INI configuration files.
Package ini provides functions for parsing INI configuration files.
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL