krz/aws-summary-report

Automated AWS summary reports, straight to your inbox. automation aws email reporting

README.org

main
aws-summary-report/README.org rendered · source · history · blame · raw

91 lines · 2030 bytes

aws summary

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.