AWS Builder Center
Weekend Annoying Task Challenge: Cloud Config Reviewer

Weekend Annoying Task Challenge: Cloud Config Reviewer

Paste any IAM policy and get back the exact wildcard actions, missing conditions, and privilege-escalation risks hiding in it explained in plain English with ready-to-use fixes. Built with Lambda, API Gateway, Bedrock, and DynamoDB, this tool turns a tedious least-privilege review into a 5-second check.

Computer Science Student | Aspiring Cloud & Software Engineer | AWS Builder

Weekend Annoying Task Challenge: Cloud Config Reviewer

Tag: #productivity

Vision & What the App Does

As a final-year CS student prepping for the AWS Solutions Architect Associate (SAA-C03) exam, I write and review IAM policies constantly — for practice exercises, for my own AWS learning account, and increasingly for real projects. Every time, the same annoying task repeats itself: manually reasoning through whether a policy follows least-privilege. Did I leave a wildcard action in? Is the resource scoped correctly? Should there be a condition block here? It's tedious, easy to get wrong, and there's no quick way to double-check my own thinking.
Screenshot showing the app finding 6 IAM policy issues with HIGH and MEDIUM severity badges

Cloud Config Reviewer solves this. You paste an IAM policy JSON into a simple web app, and within seconds it tells you exactly which parts of the policy are risky, why they matter in a real-world security sense, and how to fix them — with corrected JSON snippets you can copy straight into your policy.

How You Built It

I deliberately split the app into two layers instead of just wrapping everything in a single AI prompt:
Layer 1 — deterministic static analysis. A Lambda function parses the policy JSON and checks it against known IAM risk patterns: wildcard actions ( "Action": "*"  or service-level wildcards like  "s3:*" ), wildcard resources, high-risk actions that enable privilege escalation ( iam:CreateAccessKey ,  iam:PassRole ,  iam:AttachUserPolicy ), missing  Condition  blocks on risky permissions, wildcard principals, and risky use of  NotAction / NotResource . This step is pure code — the same policy always produces the same findings, with no AI involved in deciding what's wrong.
Layer 2 — AI explanation. The raw findings (not the whole policy) get passed to Amazon Bedrock, which turns terse rule violations into plain-English risk explanations and concrete fixes. Bedrock never decides what's wrong — only why it matters and how to fix it.
I tested this logic locally against two sample policies before touching AWS at all: an intentionally risky one (wildcard S3 access, unscoped IAM actions, wildcard principal) and a scoped, safe one with a condition requiring MFA. The risky policy correctly flagged 11 issues; the safe one flagged zero — confirming no false positives before deployment.
The trickiest part of the build wasn't the AI integration — it was CORS. After wiring up API Gateway, Lambda, and the S3-hosted frontend, my first test from the live site failed with a browser console error:  No 'Access-Control-Allow-Origin' header is present on the requested resource . The Lambda itself worked perfectly when tested directly in the console — the issue was that the preflight  OPTIONS  request from the browser wasn't getting the right headers back from API Gateway. Explicitly configuring CORS on the HTTP API (Access-Control-Allow-Origin, -Headers, and -Methods) and redeploying the API fixed it. It was a good reminder that "the backend works" and "the backend is reachable from a browser" are two different problems.

AWS Services Used / Architecture Overview

  • AWS Lambda — runs the static IAM analysis and orchestrates the Bedrock call
  • Amazon Bedrock (Nova Lite) — generates the plain-English explanations and suggested fixes
  • Amazon API Gateway (HTTP API) — exposes the Lambda as a public  POST /review  endpoint
  • Amazon DynamoDB — logs a summary of every policy review (timestamp, issue count, severities) for history tracking
  • Amazon S3 — hosts the static frontend as a public website
Screenshot showing Amazon Bedrock's explanation and JSON fix for a flagged IAM issue

  • 
[Browser: S3 static site]
| POST /review (IAM policy JSON)
v
[API Gateway - HTTP API]
v
[Lambda: cloudConfigReviewer]
|-- Static rule checks (wildcard action/resource, missing condition, etc.)
|-- Bedrock (Nova Lite): explain findings in plain English
|-- DynamoDB: log check history
v
[Response: issues[] + explanation] --> rendered in browser


What You Learned

This project turned SAA-C03 theory into something I had to actually implement correctly. Writing the rule checks meant thinking precisely about why a wildcard resource or a missing condition is risky, not just knowing it's "bad practice" abstractly. I also got hands-on with the practical side of least-privilege IAM roles — the Lambda's own execution role only has exactly the three permissions it needs (Bedrock invoke, DynamoDB write, log write), scoped to specific resource ARNs, which is the same principle the app itself is checking for.
On the infrastructure side, debugging the CORS issue taught me more about how API Gateway HTTP APIs handle preflight requests than any amount of reading would have. I also learned that Bedrock's older "Model access" console page has been retired — models like Nova Lite now activate automatically on first invocation, which simplified deployment more than I expected.
Screenshot showing the app returning 0 issues found for a properly scoped IAM policy


Link to App or Repo



Try it yourself: paste an IAM policy with a wildcard action or resource and see what it catches. Feedback welcome!

productivity

aws-free-tier

application

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article