Certbot DNS Route53 Authenticator

5.5.0 · active · verified Thu Apr 16

certbot-dns-route53 is a plugin for Certbot that automates the process of completing a DNS-01 challenge using Amazon Web Services (AWS) Route 53. It handles the creation and removal of DNS TXT records required for domain validation with Let's Encrypt. The current version is 5.5.0, and it generally follows the release cadence of the main Certbot project.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to use `certbot-dns-route53` to obtain a wildcard certificate. It highlights the requirement to set AWS credentials via environment variables (or other `boto3` supported methods) and the basic `certbot` command line usage with the `--dns-route53` authenticator.

import os

# Set AWS credentials as environment variables. For production, consider IAM roles or ~/.aws/credentials.
# Ensure the IAM user/role has the necessary Route 53 permissions (see warnings).
os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', 'YOUR_AWS_ACCESS_KEY_ID')
os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', 'YOUR_AWS_SECRET_ACCESS_KEY')

# Example command to obtain a certificate for a domain and its wildcard using dns-route53 authenticator
# Replace example.com with your domain.
# For actual use, remove --dry-run to issue a real certificate.
# If running in a CI/CD pipeline, consider --non-interactive and --agree-tos.

print("Run this command in your terminal:")
print(f"certbot certonly --dns-route53 -d example.com -d *.example.com --email user@example.com --agree-tos --non-interactive --dry-run")

# To verify plugin availability, you can run:
# certbot plugins

view raw JSON →