Coder Social home page Coder Social logo

juandi-m / awsaccountpickersso Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 16 KB

This Bash script streamlines the setup of AWS SSO profiles. It checks tool dependencies, provides profile selection, validates SSO sessions, and configures the environment variable, making AWS profile management efficient and error-free.

License: Apache License 2.0

Shell 100.00%

awsaccountpickersso's Introduction

AWS SSO Profile Configuration Utility

Quality Assurance Shell Script License

Simplify your AWS Single Sign-On (SSO) profile configuration process with this effective shell script. A perfect solution for individual developers and teams managing multiple AWS accounts and frequently alternating between various SSO profiles.

Prerequisites

Before launching this script, please ensure to install the following dependencies:

  • AWS CLI
  • jq

Refer to their respective documentation for the installation process.

Installation Steps

  1. Clone the repository to your local system:
git clone https://github.com/YOUR_GITHUB_USERNAME/aws-sso-config.git
  1. Navigate into the cloned repository:
cd aws-sso-config
  1. Assign execution permission to the script:
chmod +x awsaccounts.sh

Script Execution

For script execution, use bash or zsh:

  • Bash users:
bash awsaccounts.sh
  • Zsh users:
zsh awsaccounts.sh

Functionality

Here's a rundown of how the script operates:

  1. Verifies the installation of the required tools (jq and aws), providing installation instructions if any are missing.
  2. Lists all available AWS SSO profiles and prompts you to select one.
  3. Validates the AWS SSO session related to the chosen profile, establishing a new session if the existing one has expired.
  4. Validates the connection to the selected AWS SSO profile and proceeds with its configuration.
  5. Sets the chosen AWS SSO profile as the AWS_PROFILE environment variable in your shell profile.

The script auto-detects your shell (bash or zsh) and accordingly updates the AWS_PROFILE environment variable in the correct shell profile file.

Applying Configuration Changes

Upon successful configuration of the AWS SSO profile and updating your shell profile, apply the changes to reflect them in your current shell session.

For bash users, run the following command:

source ~/.bashrc

For zsh users, run the following command:

source ~/.zshrc

Licensing

This project operates under the Apache License 2.0. For more information, see the LICENSE.md file.

Note:

Please replace "YOUR_GITHUB_USERNAME" with your actual GitHub username in the repository cloning command.

awsaccountpickersso's People

Contributors

juandi-m avatar juanmongell 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.