Skip to content

Instantly share code, notes, and snippets.

@Mahoney
Created April 28, 2022 16:16
Show Gist options
  • Save Mahoney/3d31659c82aca3e2b986992b5bd9b76d to your computer and use it in GitHub Desktop.
Save Mahoney/3d31659c82aca3e2b986992b5bd9b76d to your computer and use it in GitHub Desktop.
Generate a wildcard cert using lets encrypt with route53 on macOS
#!/usr/bin/env bash
set -euo pipefail
domain_name=$1
brew install certbot
$( brew --prefix certbot )/libexec/bin/pip install certbot-dns-route53
mkdir -p /tmp/certbot/config /tmp/certbot/work /tmp/certbot/logs
certbot certonly \
--config-dir /tmp/certbot/config \
--work-dir /tmp/certbot/work \
--logs-dir /tmp/certbot/logs \
--dns-route53 \
-d "*.$domain_name"
ls -lA "/tmp/certbot/config/live/$domain_name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment