Skip to content

Instantly share code, notes, and snippets.

{
'state': 'California',
'extensions': {
'sub_alt_names': {
'names': <SubjectAlternativeName(<GeneralNames([])>)>
},
'basic_constraints': <BasicConstraints(ca=True, path_length=None)>, 'custom': []
},
'validity_end': <Arrow [2025-05-21T21:36:54.696211+00:00]>,
'owner': 'certs@example.com',
# Certificate Defaults
LEMUR_DEFAULT_COUNTRY = 'US'
LEMUR_DEFAULT_STATE = 'California'
LEMUR_DEFAULT_LOCATION = 'Mountain View'
LEMUR_DEFAULT_ORGANIZATION = 'Example Corp'
LEMUR_DEFAULT_ORGANIZATIONAL_UNIT = 'My Org'
# set the default plugin
LEMUR_DEFAULT_ISSUER_PLUGIN = 'verisign-issuer'
LEMUR_DEFAULT_AUTHORITY = 'verisign'
May 21 18:14:05 localhost systemd[1]: Started lemur gunicorn daemon.
May 21 18:14:19 localhost lemur[379]: /usr/local/lib/python3.5/dist-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip insta
May 21 18:14:19 localhost lemur[379]: """)
May 21 18:14:19 localhost lemur[379]: Plugin 'DigiCertCISSourcePlugin' may not work correctly. Required variable 'DIGICERT_CIS_API_KEY' is not set in Lemur's conf.
May 21 18:14:19 localhost lemur[379]: Plugin 'ACMEIssuerPlugin' may not work correctly. Required variable 'ACME_DIRECTORY_URL' is not set in Lemur's conf.
May 21 18:14:19 localhost lemur[379]: Plugin 'DigiCertIssuerPlugin' may not work correctly. Required variable 'DIGICERT_API_KEY' is not set in Lemur's conf.
May 21 18:14:19 localhost lemur[379]: Plugin 'DigiCertCISIssuerPlugin' may not work correctly. Required variable 'DIGICERT_CIS_API_KEY' is not set in Lemur's conf.
May 21 18:14:19 localhost lemur
Category Code Service
EVENTTYPES issue AWS_ABUSE_EC2_BOTNET_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_CC_FRAUD_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_COPYRIGHT_DMCA_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_COPYRIGHT_NON_DMCA_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_DOS_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_EMAIL_SPAM_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_FORUM_SPAM_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_ILLEGAL_CONTENT_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_INTRUSION_ATTEMPT_REPORT ABUSE
policies:
- name: ec2-unmark-event
resource: ec2
mode:
type: periodic
role: arn:aws:iam::{account_id}:role/custodian-auto-tag-lambda
schedule: rate(1 day)
filters:
- type: marked-for-op
policies:
- name: ec2-email-about-scheduled-maintenance
resource: ec2
mode:
type: periodic
role: arn:aws:iam::{account_id}:role/custodian-lambda-role
schedule: rate(1 day)
filters:
- type: health-event
## Ensure no root account access key exists
- name: account-root-access-keys-check
resource: account
comments: |
Verifies root access keys don't exist anymore
filters:
- type: iam-summary
key: AccountAccessKeysPresent
value: true
policies:
- name: ec2-tag-noncompliance-mark-shutdown
resource: ec2
comments: |
Schedule a resource that does not meet tag compliance policies
to be stopped in 5 days.
filters:
- State.Name: running
- "tag:aws:autoscaling:groupName": absent
#!/usr/bin/env python
import jinja2
import os
foo = jinja2.Environment(trim_blocks=True, autoescape=False)
foo.loader = jinja2.FileSystemLoader(os.path.abspath('/tmp'))
bar = foo.get_template('/custodian/email/jinja_template.j2')
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html lang="en">
<head>
<style></style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>.</title>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0"><tr><td><table style="width: 100%;" cellspacing="0" cellpadding="0" border="0"><tr><td style="line-height:0;" height="20" width="20">&nbsp;</td><td style="line-height:0;" height="20">&nbsp;</td><td style="line-height:0;" height="20" width="20">&nbsp;</td></tr><tr><td style="line-height:0;" width="20">&nbsp;</td><td>
<p class="redalert" style="color: #f00; font-weight: bold; font-size: 28px;">