krz/aws-summary-report

clone: git clone https://gitbay.org/krz/aws-summary-report.git

main: README.nfo · raw

 1┌──────────────────────────────────────────────────────────────┐
 2│  A W S   S U M M A R Y                     [ KRZ ]   krz.sh  │
 3└──────────────────────────────────────────────────────────────┘
 4
 5WHAT
 6  python tool. sends one plaintext email a day summarizing an aws
 7  account: billing, security hub findings, route 53 health checks,
 8  cloudwatch alarms, s3 audit, expiring acm certs, config compliance,
 9  cloudfront changes, waf blocks.
10
11  built for solo or small-team accounts. add a section by dropping
12  new_section.py in sections/ and listing it in config.toml.
13
14CONFIGURE
15  edit config.toml:
16
17      [aws]
18      profile = "default"
19      region = "us-east-1"
20
21      [email]
22      from = "you@example.com"
23      to = ["you@example.com"]
24      subject = "Daily AWS Report"
25
26      [report]
27      sections = ["acm"]
28
29  no aws profile yet:
30
31      aws configure --profile default
32
33RUN
34      python main.py
35
36  or with uv (installs deps, makes a venv):
37
38      uv run main.py
39
40  emails are plaintext with ascii tables via tabulate.
41
42INSTALL
43  python 3.11+.
44
45      pip install -r requirements.txt
46      # or: uv sync
47
48  needs boto3 and tabulate. the iam user or role needs read access to
49  cost explorer, security hub, s3, cloudfront, cloudwatch, route 53,
50  acm, config, waf, and ses if sending from aws.
51
52STRUCTURE
53  config.toml          aws profile, region, email, report options
54  main.py              entry point; builds and sends the report
55  email_formatter.py   formats the email body
56  utils.py             shared helpers
57  pyproject.toml       metadata and dependencies
58  sections/            one generator per section
59    acm.py             expiring certs
60    cloudfront.py      distribution changes
61    cloudwatch.py      alarms
62    config.py          config compliance
63    costexplorer.py    billing
64    route53.py         health checks
65    s3.py              bucket audit
66    securityhub.py     findings
67
68  each section implements get_section(config) -> str. add, remove, or
69  order sections in config.toml.
70
71TODO
72  - csv or html export
73  - slack or teams notifications
74  - lambda deployment
75
76LICENSE
77  0bsd. see LICENSE.
78
79┌──────────────────────────────────────────────────────────────┐
80│  krz.sh                                                      │
81└──────────────────────────────────────────────────────────────┘