krz/aws-summary-report

Automated AWS summary reports, straight to your inbox.

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

main:

100644 .gitignore92
100644 LICENSE639
100644 README.nfo2847
100644 config.example.toml395
100644 email_formatter.py499
100644 main.py894
100644 pyproject.toml724
040000 screenshots/
040000 sections/
100644 utils.py498
┌──────────────────────────────────────────────────────────────┐
│  A W S   S U M M A R Y                     [ KRZ ]   krz.sh  │
└──────────────────────────────────────────────────────────────┘

WHAT
  python tool. sends one plaintext email a day summarizing an aws
  account: billing, security hub findings, route 53 health checks,
  cloudwatch alarms, s3 audit, expiring acm certs, config compliance,
  cloudfront changes, waf blocks.

  built for solo or small-team accounts. add a section by dropping
  new_section.py in sections/ and listing it in config.toml.

CONFIGURE
  edit config.toml:

      [aws]
      profile = "default"
      region = "us-east-1"

      [email]
      from = "you@example.com"
      to = ["you@example.com"]
      subject = "Daily AWS Report"

      [report]
      sections = ["acm"]

  no aws profile yet:

      aws configure --profile default

RUN
      python main.py

  or with uv (installs deps, makes a venv):

      uv run main.py

  emails are plaintext with ascii tables via tabulate.

INSTALL
  python 3.11+.

      pip install -r requirements.txt
      # or: uv sync

  needs boto3 and tabulate. the iam user or role needs read access to
  cost explorer, security hub, s3, cloudfront, cloudwatch, route 53,
  acm, config, waf, and ses if sending from aws.

STRUCTURE
  config.toml          aws profile, region, email, report options
  main.py              entry point; builds and sends the report
  email_formatter.py   formats the email body
  utils.py             shared helpers
  pyproject.toml       metadata and dependencies
  sections/            one generator per section
    acm.py             expiring certs
    cloudfront.py      distribution changes
    cloudwatch.py      alarms
    config.py          config compliance
    costexplorer.py    billing
    route53.py         health checks
    s3.py              bucket audit
    securityhub.py     findings

  each section implements get_section(config) -> str. add, remove, or
  order sections in config.toml.

TODO
  - csv or html export
  - slack or teams notifications
  - lambda deployment

LICENSE
  0bsd. see LICENSE.

┌──────────────────────────────────────────────────────────────┐
│  krz.sh                                                      │
└──────────────────────────────────────────────────────────────┘