Skip to content

thbishop/aws-creds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-creds

Build Status

This utility reads credentials from the AWS credential file profiles and prints them for use with other tools.

Install

Download the latest binary or brew tap thbishop/aws-creds && brew install aws-creds if you're on OSX.

Usage

aws-creds --profile foo-bar

Where --profile is a profile in your ~/.aws/credentials file. If you do not provide a profile, then it will use default.

There are two modes of printing the credentials.

The first is if you want one line style env vars with env.

env $(aws-creds --profile foo) ./other-tool

This is the equivalent of doing:

env AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar ./other-tool

The second mode will prepend the export command to each item. This is useful should you just want to export the env vars in your shell.

$(aws-creds --profile foo --export) && ./other-tool

This is the equivalent of doing:

export AWS_ACCESS_KEY_ID=foo
export AWS_SECRET_ACCESS_KEY=bar && ./other-tool

Contribute

  • Fork the project
  • Make your feature addition or bug fix (with tests and docs) in a topic branch
  • Make sure tests pass
  • Send a pull request and I'll get it integrated

LICENSE

See LICENSE

About

simple tool to provide aws credentials as env vars

Resources

License

Stars

Watchers

Forks

Packages

No packages published