Installing Certbot on AWS AMI

And here’s some notes on installing Certbot on an AWS AMI EC2:

I was having all kinds of issues with the certbot process, after having taken a snapshot and producing an image to duplicate an EC2, resulting in moving one of my services ( ) to its own instance.

The certbot process was complaining with strange errors that were never present on the original instance:


And after spending several hours of googling and trying several different potential fixes, this was the one that solved the problem:

As root:
$> rm -rf /opt/*
$> /usr/local/bin/certbot-auto –debug
The above will produce errors, that’s okay, just continue:
$> cd /opt/
$> mv site-packages site-packages.sav
$> ln -s dist-packages/ site-packages
$> /usr/local/bin/certbot-auto –debug

Fixed!  Now I’m able to run “certbot-auto” to add a wildcard to a domain of mine:  

$> ./certbot-auto certonly –server –manual –preferred-challenges dns -d *

And we’re back in business.