# Policy generation

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

Policy generation is the creation of an IAM policy from observed activity. IAM Access Analyzer reads AWS CloudTrail logs for a date range and builds a template of the permissions the entity actually used. AWS says the generated template covers actions and services found in the CloudTrail events it analyzed.

## An example, sourced

AWS documentation says Access Analyzer reviews your CloudTrail logs and generates a policy template that contains the permissions the entity used in your specified date range.

## Why it matters here

It supplies a starting point for a smaller policy. The result still needs review, since it reflects only the activity in the window.

## Related pages

- [Job function policy: meaning and an example](/glossary/job-function-policy/)
- [Policy inheritance: meaning and an example](/glossary/policy-inheritance/)
- [Role assignment condition: meaning and an example](/glossary/role-assignment-condition/)
- [All of them](/glossary/)

## Sources

- https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-generation.html (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://leastprivilegeprinciple.com/glossary/policy-generation/
