Using Amazon Q helped write the script in < 3 hours (2 if you don’t count the security rabbit hole)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Security Automation (Pre-AI). The Code.
⚙️ AI Automation. The Code.
🔒 Related Stories: Cybersecurity | Penetration Tests
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Objective
Write a script that has the user specify criteria to select the appropriate instance type to use when launching an EC2 instance. I want to include criteria such as memory, VCPUs, cost, and compatibility with the selected OS and architecture from the prior post:
I started at 4:45 PM and had a working script at 6:51 PM. I tried to check for security flaws and wasted my time until 7:19 and ended up reverting to the working script. Details below.
Example query and result: