Giter VIP home page Giter VIP logo

node-letsencrypt-lambda's Introduction

Node Lambda Lets-Encrypt

Use AWS Lambda to manage SSL certificates for Lets-Encrypt.

How does it work?

This project utilizes AWS Lambda to periodically (once per day) check a set of certificates for expiration, and then if they're about to expire or invalid/missing, it will request a new certificate from the Lets-Encrypt infrastructure.

Certificates are stored in S3, which can easily be configured to send an SNS notification based upon a PUT event into the configured bucket.

Project status

Please see the roadmap for a sorted list of upcoming features by priority.

AWS Configuration

This project requires a little configuration to be used in AWS.

General configuration

Modify the configuration file with the values needed for your environment:

Variable Description
acme-directory-url Change to production url - https://acme-v01.api.letsencrypt.org if ready for real certificate.
acme-account-email Email of user requesting certificate.
s3-account-bucket An S3 bucket to place account keys/config data into. You will need to create this bucket and assign the IAM role to read/write.
s3-cert-bucket An S3 bucket to place domain certificate data into. You will need to create this bucket and assign the IAM role to read/write.
s3-folder A folder within the above buckets to place the files under, in case there are other contents of these buckets.
certificate-info Object containing certificate information mapping certificate names to domains.

Execution

Follow these steps to get started:

  1. Git-clone this repository.

     $ git clone [email protected]:ocelotconsulting/node-letsencrypt-lambda.git
    
  2. Modify configuration (as above).

  3. Create S3 buckets, IAM role, then test locally:

     $ npm run local-cert
    
  4. Package lambda zip:

     $ npm run dist
    
  5. Create lambda by uploading zip, set the handler to "app.handler", and establish your desired trigger (i.e. periodic).

Optional: You can write your certificates to a PEM file by executing:

    $ npm run pems

certificate-info field of configuration file

  • Certificate names are keys of JSON object, denoting sets of sub/domains to use as SAN names in certificate.
  • Value of certificate name keys is array of sub/domains, which can contain either:
    • a string (default, looks for route53 hosted zone with 2 levels)
    • or an object, with both name and zoneLevels defined, allowing hosted zones at levels greater than 2 (i.e. host.at.longer.domain.com could specify 4 zone levels, which would require proper NS records in parent Route53 hosted zone or other DNS).

node-letsencrypt-lambda's People

Contributors

larryboymi avatar thenickdude avatar

Stargazers

 avatar

Watchers

Jean-Adrien Vaucher avatar tundsta avatar James Cloos avatar Tom Cammann avatar Ed avatar Jose Talens avatar Rokas Slavinskas avatar Chris avatar  avatar Marcelo avatar Paul Puget avatar  avatar Patrick Plaatje avatar Zsolt Balvanyos avatar  avatar Ben Mumford avatar Adam Fielding avatar Steve avatar Pete Grace avatar Daniel Aparicio avatar Sunny Chotai avatar Felipe avatar Alexis Chantreau avatar Tatiana Turtle avatar Kate Ross-Smith avatar James Hargreaves avatar alex-decastro avatar  avatar  avatar Mike Kerry avatar JT (John Taylor) avatar  avatar  avatar Judit Varsanyi Rozsa avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.