Registry / aws / c7n-mailer

c7n-mailer

JSON →
library0.6.50pypypiunverified

Cloud Custodian Mailer is a reference mailer implementation for sending email notifications from Cloud Custodian policies. Version 0.6.49 requires Python >=3.9,<4.0. It is released irregularly alongside Cloud Custodian releases.

pip install c7n-mailer
INSTALL
IMPORT
SIG · C7N-MAILER
C
c7n-mailer
awspythonv0.6.50
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
install or import failed
glibc
py 3.10–3.95 runs
install or import failed
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Mailer
✓ from c7n_mailer import Mailer
✗ from c7n_mailer import Mailer

Initialize a Mailer with an SQS queue URL and AWS config. Note: session can be None to use default boto3 credential chain.

from c7n_mailer import Mailer config = { 'queue_url': 'https://sqs.us-east-1.amazonaws.com/123456789012/my-queue', 'region': 'us-east-1', 'role': 'arn:aws:iam::123456789012:role/my-mailer-role', 'from_address': 'security@example.com' } mailer = Mailer(config, session=None) # For production, use a proper session or pass boto3 session
c7n-mailer --version
Debug
Known issues
breakingc7n-mailer 0.6.x uses 'c7n_mailer' imports, not 'c7n.mailer'. Older docs may reference the old dotted path.
fix
Use 'from c7n_mailer import Mailer' instead of 'from c7n.mailer import mailer'.
affects: >=0.6.0
gotchaThe 'queue_url' config must point to an SQS queue that is subscribed to the SNS topic used by Cloud Custodian policies. Misconfiguration leads to no emails sent.
fix
Ensure your SQS queue has a subscription to the SNS topic where Cloud Custodian publishes messages. Verify the queue ARN and policy allow SNS to send.
affects: all
gotchaThe 'from_address' must be verified in AWS SES (or sending domain verified) to send emails. Common reason for silent failures.
fix
Verify the email address or domain in AWS SES console. Use SES sandbox mode only for verified recipients.
affects: all
deprecatedPython 3.8 support dropped in c7n-mailer 0.6.42 (requires >=3.9). Upgrade Python environment if still on 3.8.
fix
Set requires-python = ">=3.9" in your environment or use an older c7n-mailer version if locked to 3.8.
affects: >=0.6.42
Upgrade
Version history
0.6.50latest on PyPI · released May 28, 2026
Audit
Dependencies
c7nrequiredCore Cloud Custodian library required for policy execution
boto3requiredAWS SDK for sending emails via SES or SQS
jinja2requiredUsed for rendering email templates
redisoptionalOptional for using Redis as a queue backend
ldap3optionalOptional for LDAP-based address resolution
Agent activity
49 hits · last 30 days
node
40
OpenAI (training)
1
Resources
c7n-mailer — pip install c7n-mailer · libregistry