AWS IAM Policy Generator

0•

Generates least-privilege AWS IAM policies by analyzing source code for SDK calls and mapping them to required permissions.

The IAM Policy Generator skill automates the creation of secure, least-privilege AWS policies by scanning Python and Node.js codebases to identify specific AWS SDK method calls. It bridges the gap between application code and infrastructure security by mapping functions like 'put_object' or 'send_message' to their exact IAM actions, such as 's3:PutObject' and 'sqs:SendMessage'. This skill is ideal for developers and DevOps engineers who need to generate production-ready JSON policies or Terraform HCL blocks while ensuring that services are granted only the permissions they truly require, effectively reducing the cloud attack surface.

Key Features

01Automated scanning of Python (boto3) and Node.js AWS SDK usage.
02Support for resource-scoping through config and environment variable analysis.
03Precise mapping of SDK method calls to granular IAM actions.
04Generates both standard JSON policies and Terraform HCL resource blocks.
05Auditing capabilities to identify over-privileged or under-privileged existing roles.
060 GitHub stars

Use Cases

01Accelerating Infrastructure-as-Code development with pre-mapped Terraform snippets.
02Hardening existing cloud infrastructure by auditing and trimming unused permissions.
03Generating a fresh least-privilege policy for a new microservice deployment.