|
| 1 | +[](https://www.codefactor.io/repository/github/teadeveloper/awscloudexplorer) |
| 2 | + |
| 3 | + |
| 4 | +<p align="center"> |
| 5 | +<img src="images/logo.png" width="750" height="250"> |
| 6 | +</p> |
| 7 | + |
| 8 | +[](https://asciinema.org/a/1IkBGa3DB0xKuhCmWtOjeoYSx) |
| 9 | + |
| 10 | + |
| 11 | +### About The Project & Motivation |
| 12 | + |
| 13 | +Cloud Explorer is a tool for TUI lovers to explore the resources in AWS Cloud using a TUI (terminal user interface) instead a GUI or AWS web console, |
| 14 | +Inspired in legacy tools like Norton Commander, who was programming in the 80s or 90s are going to have a TUI experience using the |
| 15 | +last technology in cloud. |
| 16 | + |
| 17 | +This the first MVP of Cloud Explorer, a lot of things to be improved, new features etc.. This MVP is stable and you can use in |
| 18 | +your daily activities as a SysDev os SysAdmin. |
| 19 | + |
| 20 | +**Main features:** |
| 21 | + |
| 22 | +**TUI:** |
| 23 | + |
| 24 | +* Explore the AWS resources quickly from your terminal in Linux, Mac or Windows (CMD & WLS) using your console accounts or programmatic accounts. |
| 25 | +* Get quickly the resource configuration. |
| 26 | +* EC2 instances could be exported using customs keys. |
| 27 | +* Support filters (if supported by AWS API). |
| 28 | +* Export the configuration of a resource to YML. For example, save ec2 instance config to a yml. |
| 29 | +* Export all resources VPCs, EC2s, Buckets etc. to YML, Excel, CSV, Markdown, HTML and String. |
| 30 | + |
| 31 | +** AWS Services currently supported: ** |
| 32 | + |
| 33 | +- EC2 |
| 34 | +- VPC |
| 35 | +- Subnets |
| 36 | +- ACL Network |
| 37 | +- Security groups |
| 38 | +- Network Interfaces |
| 39 | +- Buckets |
| 40 | +- EBS |
| 41 | +- EFS |
| 42 | +- IAM |
| 43 | + - Users |
| 44 | + - Groups |
| 45 | + - Roles |
| 46 | + - Policies |
| 47 | + |
| 48 | +* Lambda functions |
| 49 | + |
| 50 | +**Pipeline Integration:** |
| 51 | + |
| 52 | +If cloud explorer runs in some sort of automation (Jenkins, Rundeck, Git Hub actions etc.) there is a command to |
| 53 | +export AWS services to a YML,Excel, CSV, Markdown, HTML and String. |
| 54 | + |
| 55 | + |
| 56 | +<!-- GETTING STARTED --> |
| 57 | +## Getting Started |
| 58 | + |
| 59 | +Cloud Explorer is written in Python, and it works in Python 3.x and the current tests are running using Python 3.8. |
| 60 | + |
| 61 | +### Prerequisites |
| 62 | + |
| 63 | +1) Your terminal Width must be **140** otherwise you got this error: |
| 64 | + |
| 65 | +```shell |
| 66 | +.NotEnoughSpaceForWidget: Not enough space: max y and x = 58 , 117. Height and Width = 18 |
| 67 | +``` |
| 68 | +To fix it, you have to resize your terminal in Linux, OSX or windows using your mouse :unamused: |
| 69 | + |
| 70 | +2) Set your AWS credentials: |
| 71 | + |
| 72 | +```shell |
| 73 | +export AWS_ACCESS_KEY_ID="XXXXXXXXX" |
| 74 | +export AWS_SECRET_ACCESS_KEY="XXXXXXXXX" |
| 75 | +export AWS_SESSION_TOKEN="XXXXXXXXX" |
| 76 | +``` |
| 77 | + |
| 78 | +### Installation |
| 79 | + |
| 80 | +Using virtual environment: |
| 81 | + |
| 82 | +```shell |
| 83 | +# clone the repo |
| 84 | +git clone https://github.com/teadeveloper/awscloudexplorer.git |
| 85 | +cd awscloudexplorer/ |
| 86 | +# Create virtual environment |
| 87 | +python3 -m venv ./venv && source venv/bin/activate |
| 88 | +# Install pre-reqs for |
| 89 | +pip install -r requirements.txt |
| 90 | +#Run cloud explorer |
| 91 | +python cloudexplorer.py |
| 92 | +``` |
| 93 | +<!-- USAGE EXAMPLES --> |
| 94 | +## Usage |
| 95 | + |
| 96 | +**Pipeline Mode** |
| 97 | + |
| 98 | +Find the python called exportall.py to export from command line or in a pipeline the AWS services to a file. |
| 99 | + |
| 100 | +1. To export all ec2 instances to a excel file with all keys: |
| 101 | + |
| 102 | + ```shell |
| 103 | +python exportall.py --ec2_all_keys --filename="ec2_all_keys.csv" --format=0 |
| 104 | + ``` |
| 105 | +2. To export all ec2 instances to an excel file with basic keys: |
| 106 | +```shell |
| 107 | +Shellpython exportall.py --ec2ins --filename="ec2.csv" --format=0 |
| 108 | +``` |
| 109 | +3. To export all users to CSV: |
| 110 | +```shell |
| 111 | +python exportall.py --user --filename="users.csv" --format=1 |
| 112 | +``` |
| 113 | + |
| 114 | +4. To export all policies to HTML: |
| 115 | + |
| 116 | +```shell |
| 117 | +python exportall.py --policy --filename="policies.csv" --format=4 |
| 118 | +``` |
| 119 | + |
| 120 | +<!-- ROADMAP --> |
| 121 | +## Roadmap |
| 122 | + |
| 123 | +Currently, I am working to improve the Python code to optimize it and also: |
| 124 | + |
| 125 | +* Add pytest/testinfra to automatize tests. |
| 126 | +* Add test to check the app works fine in several Python versions. |
| 127 | +* Support new AWS services. |
| 128 | + |
| 129 | +<!-- CONTRIBUTING --> |
| 130 | +## Contributing |
| 131 | + |
| 132 | +Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. |
| 133 | + |
| 134 | +1. Fork the Project |
| 135 | +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) |
| 136 | +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) |
| 137 | +4. Push to the Branch (`git push origin feature/AmazingFeature`) |
| 138 | +5. Open a Pull Request |
| 139 | + |
| 140 | +<!-- LICENSE --> |
| 141 | +## License |
| 142 | + |
| 143 | +Distributed under Open Source (GPL-3.0) |
| 144 | + |
| 145 | +<h3 align="left">Support:</h3> |
| 146 | +<p><a href="https://www.buymeacoffee.com/teadeveloper"> <img align="left" src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="50" width="210" alt="teadeveloper" /></a></p><br><br> |
| 147 | + |
| 148 | + |
| 149 | +## If you like it & Feedback |
| 150 | + |
| 151 | +Feel free to send me an email with your feedback or open an issue. Feature requests are always welcome. |
| 152 | + |
| 153 | +This personal project is open source (GPL-3.0), and I took me (and take me.) some time and efforts to design, to code, to make some researches and to test it in my personal AWS account. |
| 154 | + |
| 155 | +Please consider supporting it by buying me a tea or a coffee , so I can dedicate more time on it and add more new features. |
| 156 | + |
| 157 | +<!-- CONTACT --> |
| 158 | +## Contact |
| 159 | + |
| 160 | +Teadeveloper |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
0 commit comments