How to install Certbot on Amazon Linux EC2
For EC2 running Amazon Linux 2 AMI:
Enable EPEL Repo:
sudo amazon-linux-extras install epel
Install Certbot:
sudo yum install certbot-apache
You need to enable EPEL
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Reference: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/
Then certbot installation works,
sudo yum install certbot