How To Get SSL Certificate on AWS

May 29th, 2021
Author Avinash Sharma

how to get ssl certificate on aws using LetsEncryp on nginx

Table of Contents


SSH into the server

ssh -i "your-key.pem" ubuntu@ec2-x-y-z-w...amazonaws.com

Enter into sudo mode

sudo su -

by doing this you Enter in to root@ip-[ip]

Install snapd

  • this helps you to have a snap of your build and the projects/software that are on the server/system

Ensure that your version of snapd is up to date

sudo snap install core; sudo snap refresh core

Install Certbot

sudo snap install --classNameic certbot

Prepare the Certbot command

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

Choose how you'd like to run Certbot

Either get and install your certificates...

Run this command to get a certificate and have Certbot edit your Nginx configuration

automatically to serve it, turning on HTTPS access in a single step.

sudo certbot --nginx

Or, just get a certificate

If you're feeling more conservative and would like to make the changes to your Nginx

configuration by hand, run this command.

sudo certbot certonly --nginx