Skip to main content

Create Cron Job Via Lambda, to update certificate and put it to S3 Bucket.

Project description

NPM version PyPI version Release

cdk-certbot-dns-route53

cdk-certbot-dns-route53 is a CDK construct library that allows you to create Certbot Lambda Function on AWS with CDK, and setting schedule cron job to renew certificate to store on S3 Bucket.

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import aws_cdk.aws_route53 as r53
import aws_cdk.aws_s3 as s3
import aws_cdk.core as cdk
from cdk_certbot_dns_route53 import CertbotDnsRoute53Job

dev_env = {
    "account": process.env.CDK_DEFAULT_ACCOUNT,
    "region": process.env.CDK_DEFAULT_REGION
}

app = cdk.App()

stack = cdk.Stack(app, "lambda-certbot-dev", env=dev_env)

CertbotDnsRoute53Job(stack, "Demo",
    certbot_options={
        "domain_name": "*.example.com",
        "email": "user@example.com"
    },
    zone=r53.HostedZone.from_hosted_zone_attributes(stack, "myZone",
        zone_name="example.com",
        hosted_zone_id="mockId"
    ),
    destination_bucket=s3.Bucket.from_bucket_name(stack, "myBucket", "mybucket")
)

Example: Invoke Lambda Function log.

Example: Renew certificate to store on S3 Bucket

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-certbot-dns-route53-0.3.51.tar.gz (26.8 kB view hashes)

Uploaded Source

Built Distribution

cdk_certbot_dns_route53-0.3.51-py3-none-any.whl (26.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page