How did I install a Let's Encrypt certificate for Jupyter Notebook in AWS Ubuntu 20 DLAMI?

Step 1

sudo snap install core
sudo snap refresh core

certbot.eff.org/instructions?ws=other&os=ubuntufocal#instructions-header

Step 2

sudo apt-get remove certbot

02
certbot.eff.org/instructions?ws=other&os=ubuntufocal#instructions-header

Step 3

sudo snap install --classic certbot

03
certbot.eff.org/instructions?ws=other&os=ubuntufocal#instructions-header

Step 4

sudo ln -s /snap/bin/certbot /usr/bin/certbot

certbot.eff.org/instructions?ws=other&os=ubuntufocal#instructions-header

Step 5

I have setup an A DNS record pointing to my AWS server:
01

Step 6

Then I have checked that it is propagated:
02

Step 7

sudo certbot certonly --standalone

certbot.eff.org/instructions?ws=other&os=ubuntufocal#instructions-header

Step 8

sudo certbot renew --dry-run

certbot.eff.org/instructions?ws=other&os=ubuntufocal#instructions-header