Skip to main content

Vegas Credentials

AWS credential_process utility to request STS Temporary Security Credentials by assuming an IAM role with TOTP MFA via either Yubikey Touch or Authenticator Apps.
brew install aripalo/tap/vegas-credentials
  1. After installation, see: Setup
  2. After configuration, use any AWS tool normally with --profile=your-profile or see Examples for more

How it Works

You just need to set couple lines of configurations and then use any AWS tools as you would normally with named profiles. It's almost like magic. But if you don't believe in magic, here's all the tricks vegas-credentials does in the background:
How it works

As far as various AWS tools are concerned, nothing special needs to be done! No bash script wrappers, no need to export any environment variables and no need for custom code to handle the credentials:

$ aws s3api create-bucket --bucket=my-bucket --profile=my-profile

Features

List of most noteworthy features shipping with vegas-credentials

Pluggable

Into AWS credential_process

what's that?

Automatic Refresh

Credential Refresh on Session Expiry

for example CLI v2 and Go SDK

Role Chaining

Start with Vegas, go anywhere

IAM User → Role A → Role B

Yubikey Touch

Multiple Devices & Password Protection

Series 5 with OATH TOTP support

Authenticator Apps

For copy-pasting TOTP codes

Authy, Google Authenticator, etc.

Multiple MFA inputs

Yubikey Touch, GUI Prompt & Standard Input

first input wins

Encrypted Cache

Protection against Credential Scrapers

... and only temporary credentials cached

Cache Invalidation

On Configuration Change or Credential Expiry

e.g. change of role_session_name

Fast

<100ms for Cached Credentials

... does that count as blazing?

Parallelism

Parallel calls handled via mutex locking

e.g. Terraform --parallelism=n

Cross-Platform

Built with Go

macos|linux|win @ x86_64|arm64

Minimal Configuration

Within AWS config file

~/.aws/config

Supported Tools

Partial list of tools that work with vegas-credentials

AWS CLI

Since version v2
docs

AWS SDKs

C++/Go/Java/JS/.NET/PHP/Python/Ruby
compatibility

AWS CDK

Since version v1.73.0
release info

Terraform

Since terraform-provider-aws version v3.0.0
release info

Pulumi

Respects and uses your configuration settings
details

Ansible

Respects and uses your configuration settings
details