This tool is designed to interact with AWS and list resources such as EC2 instances, S3 buckets, IAM users, and more. It provides a web interface where users can select which resources they want to view.
- List AWS resources
- Interactive web interface and a Terminal-Based Version
- Supports multiple AWS profiles
This AWSPECT app is particularly crucial for Terraform users, especially when they face issues like a lost or corrupted tfstate
file. This file is essential as it tracks the state of AWS resources managed by Terraform. Losing this file can leave users without clear insight into their AWS environments.
Key Benefits:
- Resource Synchronization: Helps identify and reconcile AWS resources if the Terraform state is lost, ensuring accurate infrastructure management.
- Visibility and Audit: Provides an independent check on AWS resources, which is essential for compliance and cost management.
- Disaster Recovery: Assists in quickly identifying active AWS resources, facilitating faster recovery operations.
- Verification of Infrastructure Changes: Verifies that Terraform changes have been properly implemented in AWS, adding an extra layer of assurance.
Before you begin, ensure you have the following:
- Python 3.6 or higher
- pip3
- AWS CLI installed and configured (optional, for testing AWS credentials locally)
Follow these steps to get your development environment set up:
-
Clone the repository
git clone https://github.com/yourusername/awspect.git cd awspect
-
Set up a Python virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the requirements
pip3 install -r requirements.txt
-
Set up AWS Credentials
Make sure your AWS credentials are configured. If you haven't done so, run:
aws configure
This will prompt you to enter your AWS Access Key ID, Secret Access Key, region, and output format.
The tool uses the default AWS profile by default. You can set a different profile by modifying the .env
file:
AWS_PROFILE=default
python3 awspect-web.py
Visit http://127.0.0.1:5000/
in your web browser to use the tool.
Select the resources or select all:
NOTE:If you prefer to use the terminal-based version of this application, follow the instructions below:
This version of the application allows you to discover and list AWS resources directly within your terminal. Execute the following command to run it:
python3 awspect-terminal.py
This command launches the script that interacts with AWS to retrieve and display resources in the command line interface.
Contributions are welcome! Feel free to open pull requests or issues in the GitHub repository.