Artificial Intelligence
Generating Code and Content With AI
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🦊 New Blog — Security and AI Research: https://teriradichel.substack.com/
⚙️ 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:
AI impact on software programming
Vibe Coding:
- Coding with Grok [Don’t]
- Coding with Google AI Mode [For simple, non-proprietary scripts]
- Getting Started With Kiro (formerly Amazon Q) [ Start here]
Experiments, before I started using Amazon Q heavily:
- 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 Write Code
- Writing an Application To Deploy Anything on AWS
- AI Resources
Everyone keeps asking me what I think of AI so here you go
Note: AI is continually improving. Posts from most recent to oldest. AI does not seem ready to replace people any time soon, but it can help you do your job faster (not more accurately without supervision).
Updated Career guidance concerning AI on November 13, 2025:
In this post, I explain how I first saw AI when I was 8 or 9 years old at the home of someone who worked in the Air Force with my Dad, who joined during the war in Vietnam and was in for two years. That should give some context as to how long AI has been around and computers have been trying to answer our questions.
AI Security
As soon as I started vibe coding I immediately locked down my agents. Have you done this?
Prompt Injection Considerations
Older posts…things are changing fast
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
Protecting data submitted to AI models. Anthropic changed their policy in August 2025 to opt out if you don’t want your data used for training. Change the setting before September 28, 2025 to opt out.
Configuring AWS Identity Center in a stand alone AWS account to create Pro Tier Amazon Q subscriptions.
Note: The global readme didn’t end up working. For enforcement you need tests and other methods in other posts. This was my first attempt. In some other post I explain why enforcement is never possible in AI. It’s not deterministic. You need external forces to check and make AI fix the problems it produces.
When to use and not use AI
AI is good for code snippets and small blocks of code at a time — not entire applications all at once. But hey, that’s how you should be writing an application anyway whether you’re using AI or not. Write a small bit, test it, write some more, test it…and so on. Limiting the scope of what AI is working on will help you improve your results and help you prevent it from deleting all your code as it did in my banner script below. (Don’t worry, I had a backup in GitHub.)
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…
If you’re evaluating your use of AI
This post has a visual that further explains why lines of code is not a good metric.
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 Kiro (formerly Amazon Q)
All the posts below should work with Kiro where it says Amazon Q — for now. The Kiro IDE has been updated a lot over time. The CLI is basically the same as far as I can tell.
Get Teri Radichel’s stories in your inbox
Join Medium for free to get updates from this writer.
Just want to get started? Here you go in a nutshell. Or turtle shell, if you prefer. 🐢
I started with Q so I had to upgrade to Kiro. Because I created a shared agent framework in an alternate directory I had to find a way to upgrade to Kiro without breaking my framework. This is how I did it (with the help of Q).
IDE vs. CLI for AI Programming
Getting Started with Amazon Q Developer (CLI)
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:
Pro Tier Subscription with AWS Identity Center
Setting up an AWS account with IAM IDentity Center for use with an Amazon Q Pro Tier Account — without giving Identity Center access to your organization management account.
Can’t find access logs showing login failures. Maybe looking in the wrong place or was a network error?
Using Amazon Q in the Console 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 in the AWS Console 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 Write Code
Initial attempt to create an AMI using Q (started in the console)
What’s slowing me down using Amazon Q and how I’ve overcome the latest gotchas.
Using Q to add a global banner to scripts — don’t. But here’s how Q can help you get that done.
Had to manually fix these scripts.
Creating an IAM user with a password generated in a secret
Q went a little nuts on this one. But got it there eventually.
Writing an application to deploy anything on AWS
Using AI to write a deterministic program that will deploy any resource on AWS consistently and correctly based on the given inputs and application logic. This application does something AI cannot do because it’s not what it is designed to do, nor is it the point of AI and would be way more expensive than running this simple application. But I used AI to help me write it.
Writing Rust with Amazon Q
Learning rust in one day….
Getting to production ready code
Using AI to check for vulnerabilities:
Turning random probablistic predictive AI scans into deterministic, repeatable, provable security checks:
AI Resources
Teri Radichel | © 2nd Sight Lab 2025
About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books | Substack: teriradichel.substack.com
⭐️ 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: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab








