Recipe
AWS IAM least-privilege policy writer
Generate scoped-down IAM policies from CloudTrail logs so every service gets exactly the permissions it needs — nothing more.
Ingredients
- CloudTrail enabled in the target account
- Athena table over the CloudTrail bucket
- Meridian API key with
recipes:writescope
Steps
- Collect actions
Query Athena for distinct
eventSource+eventNamepairs over the last 90 days. - Feed Meridian
POST the action list to
/v1/recipes/iam-least-privilege. - Review output
Meridian returns a Terraform-ready policy document with wildcards collapsed and unused services stripped.
- Apply & iterate
Deploy, re-run CloudTrail analysis after 7 days, diff the deltas.
Pro tip
Pipe the output straight into Terraform with the --terraform flag. Meridian handles condition keys and resource ARN scoping automatically.