~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contents:
- Everyone keeps asking me what I think of AI so here you go
- AI Security
- When to use and not use AI
- Coding with Grok
- Coding with Google AI Mode
- Getting Started With Amazon Q
- Using Amazon Q to write CloudFormation templates to Deploy a Shared Network in AWS
- Using Amazon Q to write CloudFormation templates to Deploy a Static Website in S3 with a TLS Certificate and CloudFront
- Using Q to Create an EC2 AMI
- AI Resources
Everyone keeps asking me what I think of AI so here you go
How AI is making me rethink security automation, batch jobs, and my blog
Note: AI has improved since the following post was written, but still has some of the same issues I highlighted here, and probably always will by virtue of how it works.
I also explain when not to use AI in the post above on increasing your tech job prospects by learning AI.
AI Security
AI gave me an insecure formula used with SRP when I asked for it…
Creativity is a double-edged sword when you need to be precise
When to use and not use AI
AI is good for code snippets and small blocks of code — not entire applications
Vibe Coding — great for basic CloudFormation Templates via Amazon Q
I asked Grok why there was a typo in the code it wrote for me…
Coding with Grok
I Tried to Use AI (Grok) to Write A Single Script
Specifically I am using Grok (X’s AI solution) ~ here’s why I ended up completing the script myself
A Bug That Grok Couldn’t Fix In Its Own Code
Pretty good, but testing (or tasting) still beats analysis any day
Coding with Google AI Mode
I leveraged Google AI Mode to quickly generate some sed commands. It worked…until it didn’t.
Getting Started With Amazon Q
Getting Started with Amazon Q Developer
Let’s try it out…
Update to opt-out policies:
Setting up a Builder ID for use with Q Developer
Why you probably do not want to use a Builder ID for serious use of Q Developer, but how to login if you really want to do that:
Using Amazon Q to write CloudFormation templates to Deploy a Shared Network in AWS
Seriously. A fraction of the time it took me to create working templates to demonstrate batch jobs in my prior series. If you are deploying networking using CloudFormation check this out.
Using Amazon Q to write CloudFormation templates to Deploy a Static Website in S3 with a TLS Certificate and CloudFront
I had to write a bunch of this myself but Q was helpful with getting syntax correct and some troubleshooting (not all). I thought this would take a day or two. It took 10. I had to significantly revise the code Amazon Q produced which was overly complex, missing properties, or recommending less than secure solutions. It’s not even done yet because the code to set up logging form Amazon Q isn’t working so I’m going to have to sort that out myself. But Q was helpful overall in getting me started or getting syntax correct along the way.
Getting Q To Help Me Create EC2 AMIs
I started trying to write code to have Q help me create some AMIs. But the very first script took way longer than I thought. Not sure how long it will take to complete this as I also have other things to do.
Just thinking through the next steps:
- Need to complete the network deployment above. There was a missing route table and want to add CloudFormation for RAM.
- Select a KMS key to encrypt the AMI — or create one.
- Script to create the EC2 key pair and save it to an encrypted location
- Ask for the EC2 SSH key name used to log into the AMI from a list of keys in the account.
- Ask for an AMI keyword used in the name — user or application.
- Choose a script to run on the EC2 instance used to create the AMI (User Data)
- Pass the parameters into an E2 instance and deploy the AMI.
AI Resources
Follow for updates
Teri Radichel | © 2nd Sight Lab 2025
About Teri Radichel:~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero Former SANS, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests & Security Research ~ 2nd Sight LabCloud, SAAS, and Application Penetration Testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration testFollow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
❤️ Sign Up my Medium Email List
❤️ X, Threads, Blusky, Instagram, AWS BuildID: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @[email protected]
❤️ Facebook: 2nd Sight Lab