Skip to content

DaraDadachanji/pcreds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

save ~20 seconds when copy/pasting to your aws credentials file from Control Tower

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages