Install certbot on Amazon Linux
(official instructions at certbot.eff.org)
There is no packaged version of certbot for Amazon Linux so we have to download and set it up manually. Running it the first time will install all dependencies and should then work to create and renew certificates. Unfortunately, the first run on Amazon Linux gives us and error instead of a working certbot. :(
To install use wget to download the certbot script and then make the script executable. To avoid erroring out and failing to install dependencies you must run
unset PYTHON_INSTALL_LAYOUT before running certbot-auto for the first time. After the initial installation of dependencies certbot-auto can create and renew certificates without having to run the
unset PYTHON_INSTALL_LAYOUT command.
To get certbot installed and running on Amazon Linux run the following commands:
WHAT HAPPENS IF WE RUN CERTBOT-AUTO WITHOUT
I found the solution in this github issue.