Skip to content

Provides an Amazon AWS stack to periodically and automatically renew a Let's-encrypt-SSL-certificate.

Notifications You must be signed in to change notification settings

Gubaer/certificate-renewal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS stack to renew Let's-encrypt-SSL-certificates

This repository provides an Amazon AWS stack to periodically and automatically renew a Let's-encrypt-SSL-certificate, and to deploy it for a website hosted on Amazon S3.

The stack consists of:

  • the required AWS IAM users, roles and their associated policies
  • an Amazon ECR repository which holds a docker image with the certificate renewal script
  • an Amazon ECS task definition which describes the task to renew a certificate
  • an Amazon ECS cluster where AWS will create a docker container from the supplied docker image
  • an Amazon Lambda function which will launch the ECS task
  • an Amazon CloudWatch log group which collects the logs of the docker container and the Lambda function
  • a Amazon CloudWatch event rule which periodically (once a month) triggers the lambda function to renew the certificate

The required stack is managed with ansible playbooks.

Configuration

Configure the AWS credentials

  • copy aws.env.distrib to aws.env and update the environment variables in aws.env

  • set the required configuration values

    $ source aws.env

Configure the stack

  • copy ansible/config.yml.distrib to ansible/config.yml and update the configuration entries

Manage the stack

Create the stack

$ cd ansible
# creates the AWS stack 
$ ansible-playbook create-stack.yml

Delete the stack

$ cd ansible
$ ansible-playbook delete-stack.yml

About

Provides an Amazon AWS stack to periodically and automatically renew a Let's-encrypt-SSL-certificate.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published