c7n-mailer
Cloud Custodian - Reference Mailer
What it is and what it does
c7n-mailer is a notification relay service that bridges Cloud Custodian policies and external messaging systems. It subscribes to an AWS SQS queue, processes messages from Custodian policy actions, and forwards notifications to multiple endpoints: email via SES, Slack channels and users, DataDog metrics, and Splunk. The package is primarily an example implementation, meaning it demonstrates a pattern for organization-specific mail delivery rather than being a one-size-fits-all solution.
The mailer runs as a standalone service (or in Docker) and requires configuration via a YAML file specifying the SQS queue URL, IAM role, and credentials for each notification endpoint you want to use. Custodian policies trigger messages by including a notify action with transport type sqs, allowing policy-driven alerting across your cloud infrastructure without embedding notification logic in the policies themselves.
Use it for:
- Send email alerts when Custodian policies detect untagged or non-compliant cloud resources.
- Route resource violation notifications to Slack channels organized by team or environment.
- Publish compliance metrics to DataDog for centralized monitoring and alerting.
- Relay cross-account notifications by configuring SQS queues with cross-account permissions.
- Integrate cloud governance events into existing incident management or ticketing workflows via webhooks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A message relay service that subscribes to SQS queues and delivers notifications via email (SES), Slack, DataDog, and other endpoints, designed to work with Cloud Custodian policies.
Yes, if you run Cloud Custodian and need to route policy notifications to email, Slack, or monitoring systems. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. Install with caution only if your organization has custom notification requirements not covered by SES, Slack, DataDog, or Splunk—the package is intentionally an example, not a universal solution.
Install
c7n-mailer on PyPI
pip
pip install c7n-maileruv
uv add c7n-mailerpoetry
poetry add c7n-mailerInstalling c7n-mailer
Before you install
Low friction install with a pure-Python wheel. The package is actively maintained with a recent release and no known vulnerabilities. It carries 13 runtime dependencies including boto3, jinja2, and optional integrations (datadog, sendgrid, redis, ldap3), so installation footprint is moderate but straightforward.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most organizational deployments.
Quickstart
pip install c7n-mailer
# Create mailer.yml with queue_url, role, and from_address
# Then run: c7n-mailer --config mailer.yml
# In a Custodian policy, send messages to the queue:
# actions:
# - type: notify
# to:
# - you@example.com
# transport:
# type: sqs
# queue: https://sqs.us-east-1.amazonaws.com/account/queue-name
Requires AWS credentials and an SQS queue; SES sandbox mode requires verified email addresses; DataDog and Slack integrations need their respective API credentials.
Verify before relying
- Whether the package can run standalone or requires Cloud Custodian to be installed separately.
- Performance characteristics under high message volume or latency guarantees for delivery.
- Support for custom notification backends beyond SES, Slack, DataDog, and Splunk.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0.0,>=3.9.2) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 13 — boto3, datadog, importlib-metadata, jinja2, jsonpatch, jsonpointer, jsonschema, ldap3, python-dateutil, pyyaml, redis, sendgrid, types-six |
| Maintenance | actively maintained — 78 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 114,006/month — #12,318 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: c7n_mailer-0.6.50-py3-none-any.whl
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
c7nCloud Custodian is a rules engine that enforces…
permissive · top 5,000 on PyPI
c7n-azureAn Azure plugin for Cloud Custodian that…
permissive · top 15,000 on PyPI
c7n-orgRuns Cloud Custodian policies in parallel…
permissive · top 5,000 on PyPI
django-sesA Django email backend that routes outgoing…
permissive · top 5,000 on PyPI
custodianCustodian is a just-in-time job management…
permissive · top 15,000 on PyPI
aws-cdk.aws-sns-subscriptionsProvides AWS CDK constructs for subscribing SNS…
permissive · top 15,000 on PyPI
mailmanMailman is a mailing list management system…
copyleft · top 15,000 on PyPI
cdk-events-notifyAn AWS CDK Construct Library that automatically…
permissive · top 15,000 on PyPI
aws-cdk.aws-sqsProvides AWS CDK constructs for defining Amazon…
permissive · top 15,000 on PyPI
prefect-emailProvides Prefect workflow integration for…
permissive · top 15,000 on PyPI