- Overview
- Requirements
- Features
- Installation
- Usage
- Commands
- Contributing
- Code Review Automation
- Releasing
- Credits
- License
awsctl
is a CLI tool designed to simplify AWS environment access and resource management using AWS Single Sign-On (SSO). It provides interactive commands to configure profiles, SSH/SSM into bastion hosts, manage RDS connections, update EKS configurations, and login to ECR.
AWS CLI leverages the powerful Cobra framework to build a robust and user-friendly command-line interface.
- OS:
- Linux (Kernel 4.17+)
- macOS (10.13+)
- Windows ( limited support )
- Architecture: x86_64 or ARM64
Dependency | Version | Installation Guide | Verification Command |
---|---|---|---|
Go | 1.20+ | Go Installation | go version |
AWS CLI | v2 with SSO support | AWS CLI Installation | aws --version |
Session Manager Plugin | Latest | Session Manager Plugin | session-manager-plugin --version |
kubectl | Latest | kubectl Installation | kubectl version --client |
Docker | Latest | Docker Installation | docker --version |
ssh | Latest | OpenSSH Installation | ssh -V |
Notes:
- You need an AWS account with SSO enabled and appropriate permissions to configure SSO profiles.
- Installation commands like
sudo apt install -y kubectl
orsudo apt install -y docker.io
are Ubuntu-specific. For other systems (e.g., macOS, Windows, or other Linux distributions), refer to the linked installation guides. - The
ssh
(OpenSSH client) is typically pre-installed on Linux and macOS. If not, install it on Debian-based systems withsudo apt install -y openssh-client
or use the equivalent for your OS.
-
SSO Authentication: Log in and manage AWS SSO profiles with a single command, ensuring secure access to AWS resources.
-
Bastion/EC2 SSH Access: Connect to bastion hosts or EC2 instances via SSH or SSM with automated session setup.
-
Port Forwarding & SOCKS Proxy: Access internal AWS resources securely using dynamic port forwarding or a SOCKS5 proxy for flexible networking.
-
RDS Connectivity: Connect to RDS databases directly or via SSH/SSM tunnels, supporting both direct endpoints and secure tunneling.
-
EKS Cluster Management: Update your local kubeconfig to access Amazon EKS clusters in seconds, simplifying Kubernetes workflows.
-
ECR Authentication: Authenticate to Amazon ECR with SSO credentials to securely push and pull container images.
- Check out the latest releases at GitHub Releases. You can also install the awsctl using following command.
- To install the latest version.
curl -sS https://raw.githubusercontent.com/berrybytes/awsctl/main/installer.sh | bash
- To install specific version (e.g:
v0.0.1
)
curl -sS https://raw.githubusercontent.com/berrybytes/awsctl/main/installer.sh | bash -s -- v0.0.1
- Clone this repository
git clone [email protected]:BerryBytes/awsctl.git
- Make the
install-awsctl.sh
executable:
chmod +x install-awsctl.sh
- Run the startup script:
-
If this is your first time installing, use the
source
command:
source ./install-awsctl.sh
This ensures environment changes (like PATH
updates) take effect immediately.
- Executes in current shell session
- Updates environment variables immediately
- No terminal restart required
Run normally:
./install-awsctl.sh
Start with awsctl --help
OR awsctl -h
to get started.
-
The
awsctl sso setup
command checks for a configuration file at~/.config/awsctl/
(supported formats:config.json
,config.yml
, orconfig.yaml
). If none exists, new configuration will be setup. -
Below is sample
config.yaml
file in:
ssoSessions:
- name: "sso-session-1"
startUrl: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
region: "XX-XXXX-X"
- name: "sso-session-2"
startUrl: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
region: "XX-XXXX-X"
scopes: "sso:account:access"
Note: scopes
can be empty. Default value will be sso:account:access
The following table summarizes the available awsctl
commands:
Command | Description |
---|---|
awsctl sso setup |
Creates/updates AWS SSO profiles. Supports flags: --name , --start-url , --region for non-interactive setup. Uses ~/.config/awsctl/config.yml if available; otherwise, you will be prompted to enter the SSO Start URL, Region and SSO Name. The selected profile is then set as the default and authenticated. |
awsctl sso init |
Starts SSO authentication by allowing you to select from existing AWS SSO profiles (created via awsctl sso setup ). Useful for switching between multiple configured SSO profiles. |
awsctl bastion |
Manages SSH/SSM connections, SOCKS proxy, or port forwarding to bastion hosts or EC2 instances. |
awsctl rds |
Connects to RDS databases directly or via SSH/SSM tunnels. |
awsctl eks |
Updates kubeconfig for accessing Amazon EKS clusters. |
awsctl ecr |
Authenticates to Amazon ECR for container image operations. |
For detailed CLI command usage, see Command Usage Documentation.
We welcome contributions! Please see our contributing guidelines for more details.
Join our vibrant Discord community to connect with contributors and maintainers. Engage in meaningful discussions, collaborate on ideas, and stay updated on the latest developments!
This project uses Coderabbit AI to assist with pull request reviews.
Role: Automatically reviews pull requests for code quality, potential bugs, best practices, and documentation gaps.
How it works:
- Summarizes PR changes.
- Provides line-by-line suggestions.
- Offers codebase-wide analysis.
Note: Suggestions by Coderabbit are recommendations. Final review decisions are made by maintainers.
To trigger a release, push a commit to main
with [release]
in the commit message (e.g., git commit -m "Add feature [release]"
). The workflow will auto-increment the version, tag it, and create a draft release.
Special thanks to Berrybytes for bringing this project to life!
AWSCTL CLI Tools is open-source software licensed under the MIT License.
This revised README is more visually appealing and user-friendly while maintaining its clarity and professionalism.