Note: This post is written as part of my submission for the **Kiroween 2026 * hackathon.*
Most AWS accounts have a zombie problem.
Not the movie kind. The s3:* , dynamodb:* , and iam:PassRole on Resource = "*" kind.
Policies written in a rush during a Friday deployment. Never touched again. Silently waiting for one leaked key to turn a minor bug into a full-blown breach.
Everyone knows you should enforce least-privilege IAM.
The catch?
Auditing CloudTrail logs by hand is brutal. Mapping 500+ API calls back to Terraform HCL2 blocks takes hours.
So naturally, people throw an LLM at the .tf file and say, "Fix my IAM permissions."
Big mistake.
Raw LLMs love to improvise. They hallucinate JSON keys. They break HCL2 syntax.…