CoinAWS
is a command-line interface (CLI) tool for managing AWS resources such as EC2, SSM, and Secrets Manager. It
allows users to select AWS profiles, view and edit secrets, manage instances, and handle other AWS operations in an
interactive manner.
- Interactive selection of AWS profiles
- Viewing and editing AWS Secrets Manager secrets
- Managing EC2 instances
- Managing secret versions
- Customizable default text editor for editing secrets
You can install CoinAWS
directly using a one-liner:
curl -sL https://raw.githubusercontent.com/coingate/CoinAWS/main/install.sh | sudo sh
To build CoinAWS from source, you need to have Go installed on your system. You can then build and install the tool using the following steps:
-
Clone the repository:
git clone https://github.com/coingate/CoinAWS.git cd CoinAWS
-
Build the binary:
go build -o coinaws
-
Optionally, move the binary to
/usr/local/bin
to make it accessible from anywhere:sudo mv coinaws /usr/local/bin/
To set the default text editor for editing secrets, use the --config
flag:
coinaws --config
You will be prompted to choose your preferred text editor from a list of available editors on your system.
To start the coinaws application and manage your AWS resources:
-
./coinaws
If you moved the binary to /usr/local/bin, you can simply run:
coinaws
-
Upon running coinaws, you will be prompted to choose an AWS profile from your AWS configuration.
-
After selecting a profile, you can choose from various options such as managing EC2 instances, viewing/editing secrets, etc.
You can manage EC2 instances by selecting the EC2 option from the main menu. This allows you to start SSM session with selected instance.
When you choose to edit the latest version of a secret, the secret will be opened in your default text editor. After editing and saving the file, you will be prompted to enter a version label (or use a timestamp). The secret will be updated in AWS Secrets Manager with the new value and version label.
When you choose to view older versions of a secret, you will be prompted to select a version. The selected version will be opened in read-only mode for viewing.
main.go
: The main entry point for the application. Handles command-line arguments and coordinates the overall flow.install.sh
: A script for installing thecoinaws
binary.internal/aws-operations/
: Contains the core logic for interacting with AWS services and handling user interactions.profile.go
: Handles AWS profile selection.view.go
: Handles viewing specific versions of secrets.edit.go
: Handles editing secrets.check_token.go
: Handles checking and refreshing AWS SSO tokens.select.go
: Handles resource selection.connect.go
: Handles connecting to EC2 instances.update.go
: Handles updating secrets and generating version labels.list.go
: Handles listing resources and their details.
utils/config.go
: Manages loading and saving configuration settings.utils/helpers.go
: Contains utility functions, such as detecting available text editors and checking for AWS CLI installation.
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or improvements.
This project is licensed under the MIT License - see the LICENSE file for details.