GithubHelp home page GithubHelp logo

topu / aws2-wrap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linaro-its/aws2-wrap

0.0 1.0 0.0 52 KB

Simple script to export current AWS SSO credentials or run a sub-process with them

License: GNU General Public License v3.0

Python 100.00%

aws2-wrap's Introduction

Quality Gate Status

aws2-wrap

This is a simple script to facilitate exporting the current AWS SSO credentials or runing a command with them. Please note that it is called aws2-wrap to show that it works with AWS CLI v2, even though the CLI tool is no longer called aws2.

Install using pip

https://pypi.org/project/aws2-wrap

pip install aws2-wrap==1.0.2

Run a command using AWS SSO credentials

aws2-wrap --profile <awsprofilename> --exec "<command>"

Note that you must enclose the command to be executed within double-quotes in order to ensure that any parameters are passed to that sub-command and not to aws2-wrap.

For example:

aws2-wrap --profile MySSOProfile --exec "terraform"

Export the credentials

There may be circumstances when it is easier/better to set the appropriate environment variables so that they can be re-used by any aws command.

Since the script cannot directly set the environment variables in the calling shell process, it is necessary to use the following syntax:

eval "$(aws2-wrap --profile <awsprofilename> --export)"

For example:

eval "$(aws2-wrap --profile MySSOProfile --export)"

aws2-wrap's People

Contributors

abeluck avatar hieki avatar jscook2345 avatar krabbit avatar pcolmer avatar philip-linaro avatar

Watchers

 avatar

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.