Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philipn/aws-keyring
Easier & more secure management of your AWS keys & MFA tokens
https://github.com/philipn/aws-keyring
aws mfa
Last synced: 10 days ago
JSON representation
Easier & more secure management of your AWS keys & MFA tokens
- Host: GitHub
- URL: https://github.com/philipn/aws-keyring
- Owner: philipn
- Created: 2014-11-08T05:04:15.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T04:43:49.000Z (almost 8 years ago)
- Last Synced: 2024-10-12T17:26:41.705Z (3 months ago)
- Topics: aws, mfa
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 13
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aws-keyring
`aws-keyring` is a simple utility to make handling your AWS credentials a little more secure and easy. Instead of hard-coding your credentials into dotfiles, `aws-keyring` will instead store them in your system keychain / keyring.
`aws-keyring` also makes dealing with [AWS MFA](http://aws.amazon.com/iam/details/mfa/) much easier when using the AWS CLI or other AWS API tools.
## Installation
To install:
pip install aws-keyring
## Usage
First, add your credentials to `aws-keys`:
aws-keys add
This will prompt you for your AWS Access Key ID, AWS Secret Access Key, and ask you some other questions.
You can then get the environment settings for the default account by running:
aws-keys sync
aws-keys envTo initialize these in your current shell, simply run:
aws-keys sync
$(aws-keys env)for the default account. For a specific account, run:
aws-keys sync
$(aws-keys env )If you're using MFA, then you will be prompted for an MFA token, and `aws-keys` will connect to AWS and obtain a security token. When your security token has expired, `aws-keys` will re-prompt you for these details.
## Making life easier
You'll probably want to integrate `aws-keys` directly into your shell. For instance, if you add the following to your .bash_profile or .bashrc, it will make the usual `aws` command work right:
alias aws='$(aws-keys env) && aws'
and if you're using MFA:
alias aws='aws-keys sync && $(aws-keys env) && aws'