Hello Reader,
Today, we're making progress on our feature wishlist by tackling several key enhancements:
- Selecting Credentials: Currently, it defaults to my AWS profile for FOR509.
- Adding Support for Global Views.
- Exporting Inventory.
Step 1: Selecting Credentials
We began by addressing the first feature with the following prompt:
"Prior to enumerating the AWS account, provide a GUI pop-up that asks how the user wants to authenticate to AWS. Options should include:
- Profile in the creds file
- An API key provided by the user
If the user selects a profile, they should see a dropdown of available profiles in the creds file to choose from. If they opt to provide an API key, the system should offer a checkbox to store the key with the collection for easy reuse."
This resulted in an error when I ran the Python code. You might think, "Aha! Your lazy adventure ends here—time to fix the code yourself!" But not so fast, dear reader. Instead, I highlighted the error and prompted:
"I got this error."
After resolving two more errors using the same prompt, the model managed to fix itself, and I got the GUI functionality I wanted. Now I can either provide a key or choose from any profiles already stored within the AWS CLI.
Step 2: Progress Bars
Next, I wanted to add a progress bar to keep users informed during the enumeration process. Here's how I tackled it:
-
First Prompt:
"Add a GUI progress window that updates as the account is enumerated so the user knows what is happening."
This worked, but I wanted more. Since enumerating each region can take time, I added a secondary prompt:
-
Second Prompt:
"Add a second progress bar for each region, showing what is being enumerated."
This introduced a new issue—the progress window popped up but displayed no updates. I informed the model:
"The progress window popped up, but there were no updates displayed."
The model refactored the code to enable real-time GUI updates while enumeration was running. Voilà ! A neat dual-progress bar system was now functional.
Step 3: Region Resource Count
To enhance the user experience further, I requested:
"Add a number next to each listed region summarizing how many resources were found in that region."
This worked beautifully, providing a clear overview of resource counts per region.
Step 4: Exporting Inventory
For the final item on today's list, I wrote a more detailed prompt:
"Create a toolbar option called 'Export.' When selected, it should open a dialog asking the user to save the output in one of three formats: text (as displayed), JSON, or XLSX. After selecting the format, present a window to choose a save location and filename. The default filename should include the AWS Account ID and the current timestamp, keeping it unique with the chosen extension. Then export all regions' data to the selected file."
This feature worked on the very first attempt! The code automatically added pandas
and openpyxl
packages to support Excel output.
Step 5: Finishing Touches
To wrap things up, I asked the model to create essential project files:
-
Requirements File:
"Create a
requirements.txt
file with all the necessary packages." -
GitHub README:
"Create a README file in Markdown syntax that describes the project, how to install it, how to execute it, and includes an Apache 2 license."
Finally, I pushed the project to its new repository using Cursor for direct linking. You can explore it here: AWSExaminer GitHub Repository.
Conclusion
This project is shaping into a useful tool for my AWS cases. The best part? I haven’t had to write a single line of code or look up all the APIs I'm using. Rest assured, I’ll be testing thoroughly to catch any quirks the AI might have introduced.
Stay tuned for tomorrow’s update, where we’ll add even more features!