Code Monkey home page Code Monkey logo

aws-vault-quick-guide's Introduction

aws-vault quick guide

Official tool at https://github.com/99designs/aws-vault

Managment

  • Add aws-vault profiles

$ aws-vault --debug add <PROFILE>

  • Login to AWS Console

$ aws-vault --debug login <PROFILE>

  • Rotate aws-vault keys

$ aws-vault --debug rotate <PROFILE>

  • List aws-vault profiles, roles and sessions

$ aws-vault --debug list

  • Remove aws-vault keys

$ aws-vault --debug remove <PROFILE>

  • Clear aws-vault sessions

$ aws-vault --debug remove --sessions-only <PROFILE>

Usage

  • aws-vault basic use with subshell

$ aws-vault --debug exec <PROFILE> --

Starts a sub shell with the following ENV:

AWS_DEFAULT_REGION=eu-west-1, AWS_REGION=eu-west-1, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_SECURITY_TOKEN

  • aws-vault basic use with inline command

$ aws-vault --debug exec <PROFILE> -- aws s3 ls

  • Use aws-vault with custom ttl

$ aws-vault --debug exec <PROFILE> --session-ttl=15m --assume-role-ttl=1h --

  • Use aws-vault with --server backend

$ aws-vault --debug exec <PROFILE> --session-ttl=1h --assume-role-ttl=8h --server

A local EC2 Instance Metadata server is started. This approach has the advantage that anything that uses Amazon's SDKs will automatically refresh credentials as needed, so session times can be as short as possible.

aws config

~/.aws/config example

chrome profile

to start a new chrome/firefox profile per role

Using aws-vault with multiple browser windows by Ben Bridts

https://www.cloudar.be/uncategorized/using-aws-vault-with-mulitple-browser-windows/

Linux setup

Connor wrote a guide for linux backend: https://www.tastycidr.net/using-aws-vault-with-linux/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.