Project

aws-pws

0.0
No commit activity in last 3 years
No release in over 3 years
A password-protected CredentialProvider for AWS
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

aws-pws

Gem Version Build Status

A password-protected CredentialProvider for AWS, built on pws and largely copied from aws-keychain-util, with an accompanying command line helper.

Installation

Add the following line to your application's Gemfile.

gem 'aws-pws'

And then run bundle install.

Usage

Installation

To install:

gem install aws-pws

Usage

To create your keychain:

$ aws-pws init

This will prompt for the Access Key ID and the Secret Access Key.

To list items in the keychain:

$ aws-pws ls

To show some saved credentials:

$ aws-pws cat <name>

To emit the environment variable export commands that you can source into your shell:

$ aws-pws env <name>

To automatically grab AWS credentials from your keychain when using the aws-sdk gem, add the following code:

AWS.config(credential_provider: AWS::PWS::CredentialProvider.new(name))

Using aws-pws for a secure aws command line tool

Create the following file, aws-safe, somewhere in your path:

#!/bin/bash

set -e

export $(aws-pws cat)
aws $@

Make it executable via chmod +x aws-safe.

Using with multiple AWS accounts / credential pairs

Unlike the aws-keychain-util, aws-pws doesn't support multiple account namespaces. However, you can use the PWS environment variable to achieve this:

PWS=/path/to/alternate/pws aws-pws ...

Contributing

  1. Fork the project.
  2. Commit your changes, with specs.
  3. Ensure that your code passes specs (rake).
  4. Create a new pull request on GitHub.

Copyright and License

MIT License, see LICENSE for details.

Copyright (c) 2014 Frank Macreery and contributors.