Giter VIP home page Giter VIP logo

awsconsolesession's Introduction

AWS Console Session tool

A really basic script which is a modification of some AWS code to allow you to do to take the credentials of an assumed IAM role (Access Key, Secret Access Key, Session Token) and use them to generate a link to the AWS console allowing you to use the console as that role.

The script has some basic error checking, a few different different modes of operation. It can read AWS credentials from the OS environment, a specified credential file/profile, or from the meta data endpoint.

Invocation

The script "consoleSession.py" will take the AWS access key/secret access key/session tokena and use them to create a url you can use for the AWS console.

It will attempt to read the access key pair+session token from environment variables, then ~.aws/credentials default profile if nothing exists in the environment.

This can be overriden with arguments -c to specify a credfile, and -p for a profile

--metadata is a neat flag that tries to get credentials from the metadata endpoint. It allows you to use the AWS console as an EC2 instance.

python3 consoleSession.py -c "path/to/credentials/file" -p "profile"

or

python3 consoleSession.py

or

python3 consoleSession.py --metadata

Then you'll have an AWS console link that you can do whatever you please with. Copy paste it to your favourite browser, or invoke the browser from the command line

python3 consoleSession.py

https://signin.aws.amazon.com/federation?Action=login&Issuer=Example.org&Destination=https%3A%2F%2Fconsole.aws.amazon.com%2F&SigninToken=sadjhngjkhnasjdARanDomTokenThAtIsNotUseableSoDontBotherTryingTOUseitPleaseokayrightmkay

Dependencies

see requirements.txt

pip3 install -r requirements.txt

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.