Skip to main content

Convert AWS IAM policy JSON files into beautifully formatted Excel workbooks

Project description

iam2excel

Convert AWS IAM policy JSON files into beautifully formatted Excel (.xlsx) workbooks.

Install

pip install iam2excel

Or install directly from source:

pip install .

CLI Usage

iam2excel path/to/policy.json
# → writes policy.xlsx next to the JSON file

iam2excel path/to/policy.json -o /tmp/my_report.xlsx

Python API

from iam2excel import convert

# from a file path
out = convert("my_policy.json")
print(out)  # /absolute/path/to/my_policy.xlsx

# custom output path
out = convert("my_policy.json", output_path="reports/iam_audit.xlsx")

# from a dict (already parsed)
import json
policy = json.load(open("policy.json"))
out = convert(policy, output_path="audit.xlsx")

Excel Workbook Structure

The output workbook contains 4 sheets:

Sheet Contents
Policy Summary Version, ID, statement count table
Permissions Detail Every action × resource row, colour-coded by Effect
By Service Actions grouped by AWS service (s3, iam, ec2 …)
Actions Index All unique actions sorted A→Z with their Sids & resources

Colour legend

Colour Meaning
🟢 Green Allow effect
🟠 Orange Deny effect
🟡 Amber Row has a Condition or Principal
🔵 Blue (light) Alternating Sid groups

Example IAM JSON

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowS3ReadOnly",
      "Effect": "Allow",
      "Action": ["s3:GetObject", "s3:ListBucket"],
      "Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"],
      "Condition": {
        "StringEquals": { "aws:RequestedRegion": "us-east-1" }
      }
    },
    {
      "Sid": "DenyDelete",
      "Effect": "Deny",
      "Action": "s3:DeleteObject",
      "Resource": "*"
    }
  ]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iam2excel-1.0.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iam2excel-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file iam2excel-1.0.0.tar.gz.

File metadata

  • Download URL: iam2excel-1.0.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for iam2excel-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8f62dc5193979a498229fd704df072dbf412d18fd1d02497984eac33703b2156
MD5 7ce857338427b7bb751202638a6b0527
BLAKE2b-256 1bd1ac7a88b5e5681e4045d56ca9370106a1e014395159bdacd2a40670974ae5

See more details on using hashes here.

File details

Details for the file iam2excel-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: iam2excel-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for iam2excel-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb7d3168978f1c4d167e2d73139f2f38f3c55500944b4ea12c9d176528c6bdf9
MD5 60015c81adbe686f300b2595d6d02f2e
BLAKE2b-256 cd21c2e0857d27b056a03f6e1eae26096f234dc493f5444a37709628cda7c2c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page