aws-radar 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## [0.1.0] - 2026-04-20
4
+ ### Added
5
+ - `aws-radar inventory` — scan EC2, RDS, Lambda, ECS, EKS, ElastiCache, DynamoDB, S3, OpenSearch, SQS, SNS, ALB
6
+ - `aws-radar diagram` — generate draw.io XML from inventory CSV
7
+ - `aws-radar run` — one-shot inventory + diagram
8
+ - AWS SSO support via `--profile`
9
+ - IAM role assumption via `--role-arn`
10
+ - Multi-region support via `--all-regions`
11
+ - AccountID column in all CSV output
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ include LICENSE
2
+ include README.md
3
+ include CHANGELOG.md
4
+ recursive-include src *.py
5
+ recursive-include tests *.py
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: aws-radar
3
+ Version: 0.1.0
4
+ Summary: AWS resource inventory scanner and draw.io architecture diagram generator
5
+ Author-email: Your Name <you@example.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/yourname/aws-radar
8
+ Project-URL: Repository, https://github.com/yourname/aws-radar
9
+ Project-URL: Issues, https://github.com/yourname/aws-radar/issues
10
+ Keywords: aws,cloud,inventory,architecture,drawio,diagrams
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: System :: Systems Administration
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: boto3>=1.34.0
25
+ Requires-Dist: rich>=13.0.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=7.0; extra == "dev"
28
+ Requires-Dist: pytest-cov; extra == "dev"
29
+ Requires-Dist: moto[dynamodb,ec2,elbv2,lambda,rds,s3,sns,sqs]>=5.0; extra == "dev"
30
+ Requires-Dist: build; extra == "dev"
31
+ Requires-Dist: twine; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # aws-radar
35
+
36
+ **AWS resource inventory scanner + draw.io architecture diagram generator.**
37
+
38
+ Scans your AWS account(s) via SSO or IAM credentials and produces:
39
+ - A CSV inventory of every running resource
40
+ - A `.drawio` file you can open in [diagrams.net](https://app.diagrams.net/) — with AWS icons, region containers, and service connections auto-wired
41
+
42
+ ## Supported services
43
+
44
+ EC2 · RDS / Aurora · Lambda · ECS · EKS · ElastiCache · DynamoDB · S3 · OpenSearch · SQS · SNS · ALB / NLB
45
+
46
+ ## Installation
47
+
48
+ ```bash
49
+ pip install aws-radar
50
+ ```
51
+
52
+ ## Quick start
53
+
54
+ ```bash
55
+ # One-shot: inventory + diagram
56
+ aws-radar run --profile my-sso-profile --all-regions --output architecture.drawio
57
+
58
+ # Or step by step:
59
+ aws-radar inventory --profile my-sso-profile --all-regions --export inventory.csv
60
+ aws-radar diagram --input inventory.csv --output architecture.drawio
61
+ ```
62
+
63
+ Then open `architecture.drawio` at [app.diagrams.net](https://app.diagrams.net/).
64
+
65
+ ## AWS SSO usage
66
+
67
+ ```bash
68
+ # Configure SSO once
69
+ aws configure sso
70
+
71
+ # Login before each session
72
+ aws sso login --profile my-profile
73
+
74
+ # Run
75
+ aws-radar run --profile my-profile --all-regions
76
+ ```
77
+
78
+ ## Multi-account
79
+
80
+ ```bash
81
+ for profile in prod staging dev; do
82
+ aws sso login --profile $profile
83
+ aws-radar run --profile $profile --csv ${profile}.csv --output ${profile}.drawio
84
+ done
85
+ ```
86
+
87
+ ## Python API
88
+
89
+ ```python
90
+ import boto3
91
+ from aws_radar.inventory import run_inventory
92
+ from aws_radar.drawio import build_drawio
93
+
94
+ session = boto3.Session(profile_name="my-profile")
95
+ rows = run_inventory(["us-east-1", "eu-west-1"], session, account_id="123456789012")
96
+
97
+ mxfile = build_drawio(rows, account_id="123456789012")
98
+ ```
99
+
100
+ ## Required IAM permissions
101
+
102
+ Attach the AWS-managed **`ReadOnlyAccess`** policy, or grant these specific actions:
103
+
104
+ ```
105
+ ec2:Describe* · rds:Describe* · lambda:ListFunctions
106
+ ecs:List*/Describe* · eks:List*/Describe*
107
+ elasticache:Describe* · dynamodb:ListTables/DescribeTable
108
+ s3:ListAllMyBuckets · opensearch:List*/Describe*
109
+ sqs:ListQueues · sns:ListTopics
110
+ elasticloadbalancing:DescribeLoadBalancers
111
+ sts:GetCallerIdentity
112
+ ```
113
+
114
+ ## License
115
+
116
+ MIT
@@ -0,0 +1,83 @@
1
+ # aws-radar
2
+
3
+ **AWS resource inventory scanner + draw.io architecture diagram generator.**
4
+
5
+ Scans your AWS account(s) via SSO or IAM credentials and produces:
6
+ - A CSV inventory of every running resource
7
+ - A `.drawio` file you can open in [diagrams.net](https://app.diagrams.net/) — with AWS icons, region containers, and service connections auto-wired
8
+
9
+ ## Supported services
10
+
11
+ EC2 · RDS / Aurora · Lambda · ECS · EKS · ElastiCache · DynamoDB · S3 · OpenSearch · SQS · SNS · ALB / NLB
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pip install aws-radar
17
+ ```
18
+
19
+ ## Quick start
20
+
21
+ ```bash
22
+ # One-shot: inventory + diagram
23
+ aws-radar run --profile my-sso-profile --all-regions --output architecture.drawio
24
+
25
+ # Or step by step:
26
+ aws-radar inventory --profile my-sso-profile --all-regions --export inventory.csv
27
+ aws-radar diagram --input inventory.csv --output architecture.drawio
28
+ ```
29
+
30
+ Then open `architecture.drawio` at [app.diagrams.net](https://app.diagrams.net/).
31
+
32
+ ## AWS SSO usage
33
+
34
+ ```bash
35
+ # Configure SSO once
36
+ aws configure sso
37
+
38
+ # Login before each session
39
+ aws sso login --profile my-profile
40
+
41
+ # Run
42
+ aws-radar run --profile my-profile --all-regions
43
+ ```
44
+
45
+ ## Multi-account
46
+
47
+ ```bash
48
+ for profile in prod staging dev; do
49
+ aws sso login --profile $profile
50
+ aws-radar run --profile $profile --csv ${profile}.csv --output ${profile}.drawio
51
+ done
52
+ ```
53
+
54
+ ## Python API
55
+
56
+ ```python
57
+ import boto3
58
+ from aws_radar.inventory import run_inventory
59
+ from aws_radar.drawio import build_drawio
60
+
61
+ session = boto3.Session(profile_name="my-profile")
62
+ rows = run_inventory(["us-east-1", "eu-west-1"], session, account_id="123456789012")
63
+
64
+ mxfile = build_drawio(rows, account_id="123456789012")
65
+ ```
66
+
67
+ ## Required IAM permissions
68
+
69
+ Attach the AWS-managed **`ReadOnlyAccess`** policy, or grant these specific actions:
70
+
71
+ ```
72
+ ec2:Describe* · rds:Describe* · lambda:ListFunctions
73
+ ecs:List*/Describe* · eks:List*/Describe*
74
+ elasticache:Describe* · dynamodb:ListTables/DescribeTable
75
+ s3:ListAllMyBuckets · opensearch:List*/Describe*
76
+ sqs:ListQueues · sns:ListTopics
77
+ elasticloadbalancing:DescribeLoadBalancers
78
+ sts:GetCallerIdentity
79
+ ```
80
+
81
+ ## License
82
+
83
+ MIT
@@ -0,0 +1,62 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "aws-radar"
7
+ version = "0.1.0"
8
+ description = "AWS resource inventory scanner and draw.io architecture diagram generator"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ { name = "Your Name", email = "you@example.com" }
14
+ ]
15
+ keywords = ["aws", "cloud", "inventory", "architecture", "drawio", "diagrams"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: System Administrators",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: System :: Systems Administration",
26
+ "Topic :: Utilities",
27
+ ]
28
+ dependencies = [
29
+ "boto3>=1.34.0",
30
+ "rich>=13.0.0",
31
+ ]
32
+
33
+ [project.optional-dependencies]
34
+ dev = [
35
+ "pytest>=7.0",
36
+ "pytest-cov",
37
+ "moto[ec2,rds,lambda,s3,dynamodb,sqs,sns,elbv2]>=5.0",
38
+ "build",
39
+ "twine",
40
+ ]
41
+
42
+ [project.urls]
43
+ Homepage = "https://github.com/yourname/aws-radar"
44
+ Repository = "https://github.com/yourname/aws-radar"
45
+ Issues = "https://github.com/yourname/aws-radar/issues"
46
+
47
+ [project.scripts]
48
+ aws-radar = "aws_radar.__main__:main"
49
+
50
+ [tool.setuptools.packages.find]
51
+ where = ["src"]
52
+
53
+ [tool.setuptools.package-dir]
54
+ "" = "src"
55
+
56
+ [tool.pytest.ini_options]
57
+ testpaths = ["tests"]
58
+ addopts = "-v --tb=short"
59
+
60
+ [tool.coverage.run]
61
+ source = ["aws_radar"]
62
+ omit = ["tests/*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,10 @@
1
+ """
2
+ aws-radar — AWS resource inventory & draw.io architecture diagram generator.
3
+
4
+ Quick start:
5
+ from aws_radar.inventory import run_inventory
6
+ from aws_radar.drawio import build_drawio
7
+ """
8
+
9
+ __version__ = "0.1.0"
10
+ __author__ = "Your Name"
@@ -0,0 +1,92 @@
1
+ """
2
+ Entry point for:
3
+ python -m aws_radar
4
+ aws-radar (after pip install)
5
+ """
6
+
7
+ import argparse
8
+ import sys
9
+
10
+
11
+ def main():
12
+ parser = argparse.ArgumentParser(
13
+ prog="aws-radar",
14
+ description="AWS resource inventory & draw.io architecture diagram generator",
15
+ )
16
+ sub = parser.add_subparsers(dest="command", required=True)
17
+
18
+ # ── inventory sub-command ──
19
+ inv = sub.add_parser("inventory", help="Scan AWS account and list all resources")
20
+ inv.add_argument("--region", default=None, help="AWS region (default: boto3 default)")
21
+ inv.add_argument("--profile", default=None, help="AWS SSO/named profile")
22
+ inv.add_argument("--role-arn", default=None, help="IAM role ARN to assume")
23
+ inv.add_argument("--all-regions", action="store_true", help="Scan all enabled regions")
24
+ inv.add_argument("--export", metavar="FILE.csv", help="Export results to CSV")
25
+
26
+ # ── diagram sub-command ──
27
+ dia = sub.add_parser("diagram", help="Generate draw.io diagram from inventory CSV")
28
+ dia.add_argument("--input", required=True, help="CSV produced by 'inventory'")
29
+ dia.add_argument("--output", default="architecture.drawio", help="Output .drawio file")
30
+
31
+ # ── all-in-one sub-command ──
32
+ run = sub.add_parser("run", help="Inventory + diagram in one shot")
33
+ run.add_argument("--region", default=None)
34
+ run.add_argument("--profile", default=None)
35
+ run.add_argument("--role-arn", default=None)
36
+ run.add_argument("--all-regions", action="store_true")
37
+ run.add_argument("--csv", default="inventory.csv", help="Intermediate CSV path")
38
+ run.add_argument("--output", default="architecture.drawio", help="Output .drawio file")
39
+
40
+ args = parser.parse_args()
41
+
42
+ if args.command == "inventory":
43
+ from aws_radar.inventory import main as inv_main
44
+ sys.argv = _rebuild_argv("inventory", args)
45
+ inv_main()
46
+
47
+ elif args.command == "diagram":
48
+ from aws_radar.drawio import main as dia_main
49
+ sys.argv = _rebuild_argv("diagram", args)
50
+ dia_main()
51
+
52
+ elif args.command == "run":
53
+ import csv as _csv
54
+ from aws_radar.inventory import main as inv_main
55
+ from aws_radar.drawio import main as dia_main
56
+
57
+ # Step 1 — inventory
58
+ print("── Step 1/2: Running inventory ──")
59
+ inv_args = ["aws-radar"]
60
+ if args.profile: inv_args += ["--profile", args.profile]
61
+ if args.role_arn: inv_args += ["--role-arn", args.role_arn]
62
+ if args.region: inv_args += ["--region", args.region]
63
+ if args.all_regions: inv_args += ["--all-regions"]
64
+ inv_args += ["--export", args.csv]
65
+ sys.argv = inv_args
66
+ inv_main()
67
+
68
+ # Step 2 — diagram
69
+ print("\n── Step 2/2: Generating diagram ──")
70
+ sys.argv = ["aws-radar", "--input", args.csv, "--output", args.output]
71
+ dia_main()
72
+
73
+ print(f"\n✓ Done! Open {args.output} at https://app.diagrams.net/")
74
+
75
+
76
+ def _rebuild_argv(cmd, args):
77
+ argv = ["aws-radar"]
78
+ d = vars(args)
79
+ for k, v in d.items():
80
+ if k == "command":
81
+ continue
82
+ flag = "--" + k.replace("_", "-")
83
+ if isinstance(v, bool):
84
+ if v:
85
+ argv.append(flag)
86
+ elif v is not None:
87
+ argv += [flag, str(v)]
88
+ return argv
89
+
90
+
91
+ if __name__ == "__main__":
92
+ main()