certbot, aws, amazon linux 2,

How to install Certbot on Amazon Linux 2

Nov 26, 2021 · 1 min read · Post a comment

Using AWS amazon linux 2 template for your EC2 instance is always a preferred way as an AWS-optimized and proprietary template. So if your web application requires an SSL/TLS certificate you can use the AWS certificate manager or the easiest and the quickest method is to SSH into the instance and install Certbot. Today I’m going to cover the installation of Certbot on Amazon Linux 2.

Prerequisites

  • Amazon Linux 2
  • sudo privileges

Install Certbot on Amazon Linux 2

Step 1. Update system packages as a good practice.

sudo yum update

Step 2. Install the epel repository.

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Step 3. Install Certbot and its dependencies which are related to the web server that you are using atm.
Apache:

sudo yum install certbot python3-certbot-apache mod_ssl

Nginx:

sudo yum install certbot python-certbot-nginx

Step 4. To check the version and the installation as well, run:

certbot --version

Output:

certbot 1.11.0

Conclusion

Feel free to leave a comment regarding some concerns about the Certbot installation on Amazon Linux 2 and if you find this tutorial useful, follow our official channel on Telegram.