Coder Social home page Coder Social logo

pcreds's Introduction

Pcreds

When logging into the commandline using Control Tower, you typically need to click the copy button, open your credentials file, paste the contents in the appropriate location, and then potentially change the profile name.

pcreds is a simple commandline utility to do all of these things with one command.

pcreds:

  • Reads a credentials profile from the clipboard
  • Parses the profile name and looks up an alias in pcreds.yaml (stored in your .aws folder)
  • Parses your credentials file, updates the corresponding profile and saves an updated version

Installation

Install Go from the official website

clone this repository and build the executable. Then move it to your bin folder

git clone https://github.com/DaraDadachanji/pcreds.git
cd pcreds
go mod tidy
go build
mv ./pcreds /usr/local/bin/pcreds

Configuration

You may create a pcreds.yaml file in ~/.aws to store aliases for your profiles

profiles:
  123456789012_My-Profile: default
  123456789012_My-Dev-Profile: usdev
  987654321098_My-Profile: euprod
  987654321098_My-Dev-Profile: eudev

The key should be the profile name generated by SSO while the value should be your preferred alias for it.

This step is optional

Usage

simply copy the value from the SSO browser window and then run pcreds in your terminal

pcreds's People

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.