Write IAM Policies

Draft least-privilege IAM policies for AWS services with explicit actions and conditions.

13|3|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/heaptracetechnology/heaptrace-skills --skill write-iam-policies-heaptracetechnology
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Write IAM Policies
Source: https://github.com/heaptracetechnology/heaptrace-skills/tree/main/cloud-engineer/iam-policy
Command: npx skills add https://github.com/heaptracetechnology/heaptrace-skills --skill write-iam-policies-heaptracetechnology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps security-minded teams design and implement least-privilege IAM policies for AWS, ensuring precise access control, auditable approvals, and reduced blast radius across multi-account environments.

Core Features & Use Cases

  • Policy authoring: Define explicit actions, resources, and conditions to minimize broad access.
  • Trust and roles: Model trusted relationships, cross-account access, and role assumptions with clear boundaries.
  • Compliance and governance: Provide justifications, tagging, and auditing hooks to satisfy security controls and audits.

Quick Start

Draft a minimal least-privilege IAM policy for an S3 read-only workload and explain the justification.

Frequently Asked Questions about Write IAM Policies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a least-privilege IAM policy for AWS?

To write a least-privilege IAM policy, define explicit actions, resource-level permissions, and condition keys to minimize broad access. This Skill drafts policies with precise access control, justification tagging, and auditable changes for production environments.

Can I model cross-account access and trust relationships in an IAM policy?

Yes, you can model cross-account access and trust relationships by defining role assumptions with clear boundaries. This Skill generates IAM policies that scope trusted relationships across multi-account environments while maintaining strict security controls.

What is the best way to add justification tagging to IAM policies for compliance?

The best way to add justification tagging to IAM policies is to embed auditing hooks and tags directly within the policy definition. This Skill provides governance features to satisfy security controls and audit requirements across production environments.

Does this approach support condition keys for resource-level permissions in AWS?

Yes, this approach supports condition keys for resource-level permissions in AWS. The Skill drafts policies that require explicit actions and condition keys to ensure precise access control and reduce the blast radius of permissions.