Free SSL certificates with Certbot in AWS Lambda

Vittorio Nardone
The Startup
Published in
5 min readApr 29, 2020

--

Photo by Jason D on Unsplash

Thanks to Certbot and to Electronic Frontier Foundation it is possible to provide a totally free SSL certificate to your website. Certbot is a command line tool to request a valid SSL certificate for your domain, following a process to verify the ownership. The tool can also deal with web server certificate installation and many other tasks (plugins available). This post is a guide about how to automatically request and renew your free SSL certificates with Certbot in AWS Lambda.

Why use Certbot in AWS Lambda?

I deal with several web applications using CloudFront for content distribution, associated with a source S3 bucket. So I decided to create a simple Lambda function that deals with obtaining SSL certificates with Certbot and periodically verifying their expiration date. If necessary, it automatically renews and imports the new certificate onto AWS Certificate Manager.

Result? No more expired SSL certificates! The automation of the process is particularly important considering the short life (90 days) of the certificates issued by Let’s Encrypt CA.

Solution Overview

--

--

Vittorio Nardone
The Startup

Docebo Learning Analytics team leader — AWS Certified Solutions Architect — AI/ML enthusiast