RubySpeeders / Drum-Roulette

https://drum-roulette.vercel.app
3 stars 3 forks source link

DR-138-script-renew-AWS-certificate #138

Open RubySpeeders opened 1 year ago

RubySpeeders commented 1 year ago

ISSUE TEMPLATE

User Story


As a developer, I want to be able to renew the AWS certificate with a script, so that I don't have to do it every 3 months.

General Description


The scope of this ticket includes writing a script (or Lambda?) to renew the AWS certificate every 3 months.

Technical Steps

sudo amazon-linux-extras install epel
sudo yum install certbot-apache
sudo certbot certonly --manual --preferred-challenges dns -d your-domain.com
sudo yum check-update  
sudo yum install python3-certbot-dns-route53  

Create a script that uses Certbot with the Route 53 plugin for certificate renewal. The script does not contain access keys:

#!/bin/bash

sudo certbot certonly --dns-route53 --dns-route53-propagation-seconds 30 -d yourdomain.com -d www.yourdomain.com 
sudo crontab -e

The time and date settings here (in the format minute hour day month) indicate that the renewal command will be executed at 2 AM on the 1st day of every month.

0 2 1 * * /path/to/renew_cert.sh

Acceptance Criteria


Accessibility Acceptance Criteria

RubySpeeders commented 1 year ago
Screenshot 2023-10-06 at 9 06 06 PM