About Iam Policy Autopilot
Iam Policy Autopilot is an MCP server published by awslabs in the Developer Tools category: iAM Policy Autopilot is an open source static code analysis tool that helps you quickly create baseline AWS IAM policies that you can refine as your application evolves. This tool is available as a command-line utility and MCP server for use within AI coding assistants for quickly building IAM policies. Conduid read 3 tools from its source: fix_access_denied, generate_application_policies and generate_policy_for_access_denied. No package is published for it, so it installs from a source checkout.
The repository has 510 stars and 62 forks, is licensed Apache-2.0, and its last commit was on 29 Nov 2026. The latest release is 0.4.0 (29 Oct 2026): Policy split size is configurable through --max-policy-size, the max_policy_size library setting, the MaxPolicySize MCP input, and the maxPolicySize WASM option. It follows 0.3.0 (18 Aug 2026), and the 5 most recent releases go back to 0.2.1 (8 May 2026). It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass No dynamic code execution and Scoped permissions. Its topics include iam, aws and devtools.
Install
git clone https://github.com/awslabs/iam-policy-autopilotTools (3)
fix_access_deniedTool that applies IAM Policy fix generated for IAM AccessDenied exceptions to the user's AWS account INSTRUCTIONS: 1. Ensure the user has aws profile setup and has active AWS credentials 2. Only use the tool if the original policy was first generated using generate_policy_for_access_denied tool and surfaced to the user - If the resource block of the original policy could be improved, suggest the improved policy to the user - If desired by the user, use the resource_override parameter to broaden or narrow the resource scope of the generated policy 3. After successfully applying the policy, you MUST provide a clear summary that includes: - What access was fixed (the specific action/resource that was denied) - Where the policy was applied (the principal ARN - user/role that received the fix) - The name of the IAM policy that was created or updated 4. Format the summary in a user-friendly way that clearly explains what was accomplishedgenerate_application_policies**PRIMARY POLICY GENERATION TOOL** - Generate AWS IAM policies, permissions, and access controls. Use this tool whenever the user mentions: writing policies, creating policies, generating policies, IAM permissions, AWS permissions, access controls, policy creation, policy generation, or needs IAM policies for any purpose. This tool analyzes application source code files (Python, JavaScript, TypeScript, Go, Java, etc.) or Terraform plans in JSON form produced by `terraform show -json` to automatically generate tightly scoped IAM policies for AWS services used in the code or changed by the plan. **WHEN TO USE THIS TOOL:** - User asks to write, create, or generate IAM policies - User needs to create IAM entities with policies as part of another operation - User mentions needing AWS permissions or access controls - User is working with infrastructure as code and needs policies - User has source code that uses AWS services and needs corresponding IAM policies - User has a Terraform plan and needs permissions to apply its resource changes - User asks about policy generation, policy creation, or IAM permissions - ANY discussion about writing or creating AWS policies should trigger this tool **INSTRUCTIONS:** 1. Use the correct absolute paths when passing in the input files to the MCP tool. Before passing any path, you MUST: - Resolve it to its canonical absolute path (resolving `..` segments and symlinks) - Verify the canonical path is located within the user's workspace; do NOT pass paths outside of it - Reject paths containing shell metacharacters (; | & $ ` < > or newlines) and ask the user to confirm the correct path - Never interpolate paths into a shell command string; pass each path as a separate element of the input list 2. Use service_hints to help generate more accurate policies by specifying expected AWS services 3a. For application code, you MUST include ALL relevant source files that interact with AWS services 3b. For Terraform, provide the plan in JSON form produced by `terraform show -json` 4. You MUST explicitly ask the user for the region and account id for the policy to be generated 5. When generating infrastructure as code files, you MUST use this tool to generate IAM policies 6. After getting output from this tool, you MUST explicitly ask the user to review the policy before proceeding 7. This is the PRIMARY tool for all policy-related requests - use it liberally when policies are mentionedgenerate_policy_for_access_deniedTool that generates policy for IAM AccessDenied Exceptions INSTRUCTIONS: 1. After you get access denied fix policy output from this tool, you MUST explicitly ask the user to review the policy before proceeding.Security checks
Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.5K words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by Cargo.lock and 5 more.
- !No dynamic code executionScanned 171 source files and found 1 call to eval or shell execution, in iam-policy-autopilot-wasm/npm/src/index.ts:190. Review how tool inputs reach them before granting credentials.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdio and Streamable HTTPiam-policy-autopilot-mcp-server/src/mcp.rs:272, iam-policy-autopilot-mcp-server/src/mcp.rs:14
- Starts other programs
- 13 callsiam-policy-autopilot-policy-generation/build.rs:779, iam-policy-autopilot-policy-generation/build.rs:886, iam-policy-autopilot-policy-generation/build.rs:923
- Outbound network calls
- 4 callsiam-policy-autopilot-common/src/telemetry/client.rs:13, iam-policy-autopilot-policy-generation/src/enrichment/http_client.rs:22, iam-policy-autopilot-wasm/em_fetch.js:15
- Writes or deletes files
- 45 callsiam-policy-autopilot-common/src/telemetry/config.rs:141, iam-policy-autopilot-common/src/telemetry/config.rs:149, iam-policy-autopilot-policy-generation/build.rs:271
- Lockfile
- Cargo.lock and 5 more
Pattern matches on the source text of 171 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 2.5K words, fetched 4 days ago. The original in the repository is authoritative.
Read full README