Skip to content

ualter/awsbe-site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

☁️ AwsBe

A tool to help handle AWS Session connections on terminals, using your configured AWS Shared Config and Credentials files. It manages Roles to Assume, MFA Token requests, AWS SSO Sign-in, AWS SSO Tokens and the expiration of opened sessions.

AwsBe Click on image to see it larger

Table of Contents
  1. Getting Started
  2. Usage
  3. Autocompletion Script
  4. Contact
  5. WIP

📌 Getting Started

🔨 Prerequisites

  • AWS Shared Config and Credentials files
    • The awsbe use the AWS Shared Config and Credentials files to handle the AWS Sessions. For this tool to work properly (and to take full advantage of it), you must have all the information well configured on the credentials and config files (like: Profiles, Source Profiles, Region, MFA Serial, Sso_Start_URL, Sso_Role_Name, etc.), for all details check their documentation here.

(back to top)

💾 Installation

💿 Download:

💻 LINUX and MAC

tar -xvf awsbe-${VERSION}-linuxAmd64.tar.gz 
# Use the provided script
sh install.sh # Notice! The script must have permission to move files to folder /usr/local/bin

### OR

# DIY...
tar -xvf awsbe-${VERSION}-linuxAmd64.tar.gz
chmod +x awsbe
mv awsbe /usr/local/bin/
mv awsbebin-${VERSION} /usr/local/bin/
echo "alias awsbe='source awsbe'" >> ~/.bashrc
echo "alias awsbe='source awsbe'" >> ~/.zshrc
alias awsbe='source awsbe'  # To work properly in the opened terminal already

# IMPORTANT! 
# In any of installation method, make it sure that in your ~/.bashrc (or ~/.zshrc) file
# you have an alias for awsbe properly configured. This line must be there:
alias awsbe='source awsbe'

💻 WINDOWS

# Unpack the tar file and put the two files in your PATH Environment Variable
# They must be kept together, in the same folder
awsbe.bat
awsbebin-${VERSION}.exe
# Always call awsbe to work properly, not the .exe directly

(back to top)

🏃 Usage

# Execute without parameters to open an User Interface to manage your AWS Sessions:
awsbe

# Execute passing as a parameter the AWS Profile to be started
# The terminal will be configured directly without open the AwsBe User Interface
# awsbe [PROFILE-NAME]
awsbe dev
awsbe prod

# To show the current AWS Session opened in terminal 
awsbe -s

# List all my profiles
awsbe -l

# To see all available options:
awsbe -h

(back to top)

✏️ Autocompletion Script

Generate the autocompletion script for awsbe for the specified shell.

### BASH
source <(awsbe completion bash)
## Linux:
awsbe completion bash > /etc/bash_completion.d/awsbe
## macOS:
awsbe completion bash > /usr/local/etc/bash_completion.d/awsbe


### ZSH
echo "autoload -U compinit; compinit" >> ~/.zshrc
awsbe completion zsh > "${fpath[1]}/_awsbe"
# You will need to start a new shell for this setup to take effect.

(back to top)

📫 Contact

Ualter Otoni

(back to top)

🚧 Working in progress...

👷 Having some fun in my spare time... this is the real goal here 😜

  • Tested so far...
    • ✔️ Windows Terminal ⏩ WSL2 Ubuntu
    • ✔️ Windows Terminal ⏩ Command Prompt
    • ✔️ WSL2 Ubuntu (works with no unicode characters support)
    • ✔️ Windows Command Prompt (works with no unicode characters support)
    • ✔️ EC2 Amazon Linux

(back to top)