Python is required to run the boto_formatter. Download python https://www.python.org/downloads/
Clone the boto_formatter github repository to your computer using the following command
git clone https://github.com/awslabs/boto-formatter.git
Unix/macOS
cd boto-formatter
python3 -m pip install --upgrade build
python3 -m build
Windows
cd boto-formatter
py -m pip install --upgrade build
py -m build
Running build command will generate dist folder and creates following two files in the dist directory:
- boto_formatter-1.0.0.tar.gz
- boto_formatter-1.0.0-py3-none-any.whl
mkdir boto3_formatter_test
cd boto3_formatter_test
Copy the distribution file boto_formatter-1.0.0.tar.gz to project directory.
To test the functionality, copy any usage file example s3_usage.py from tests/s3_usage.py to project directory
Follow the instruction depending upon your OS
Unix/macOS
4.1 Create virtual environment
python3 -m venv .venv
4.2 Activate python virtual environment
source .venv/bin/activate
4.3 Install boto_formatter library and boto3 sdk
pip install boto_formatter-1.0.0.tar.gz
pip install boto3
Windows
4.1 Create virtual environment
python -m venv .venv
4.2 Activate python virtual environment
cd .venv/scripts
activate
4.3 Go up to the directory to project directory
cd ..
cd ..
4.4. Install boto_formatter library and boto3 sdk
pip install boto_formatter-1.0.0.tar.gz
pip install boto3
**You have successfully installed boto_formatter **
Run the s3_usage.py
Unix/macOS
python3 s3_usage.py
Windows
python s3_usage.py
Output folder will be created with list of s3 buckets. Review the sample code (s3_usage.py) [https://github.com/awslabs/boto-formatter.git/-/blob/main/tests/s3_usage.py]
You can explore other AWS services like iam, s3 ..and generate the output as csv, json. You can also send the output to file or print list on command prompt to explore these options (click here)[https://github.com/awslabs/boto-formatter.git/-/blob/main/tests/general_usage.py]
- Delete the Output folder
- Uninstall pip uninstall boto_formatter-1.0.0.tar.gz
- Uninstall pip uninstall boto3