Home

Awesome

Node Lambda ACME (Let's Encrypt-compatible)

Use AWS Lambda to manage SSL certificates for ACME providers.

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 ACME 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:

VariableDescription
acme-directory-urlChange to production url - https://acme-v01.api.letsencrypt.org if ready for real certificate.
acme-account-emailEmail of user requesting certificate.
s3-account-bucketAn 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-bucketAn S3 bucket to place domain certificate data into. You will need to create this bucket and assign the IAM role to read/write.
s3-folderA folder within the above buckets to place the files under, in case there are other contents of these buckets.
certificate-infoObject containing certificate information mapping certificate names to domains.

ACME v2 Support

Change the acme-directory-url to one of the v2 urls:

and you will be able to request wildcarded certificates.

Execution

Follow these steps to get started:

  1. Git-clone this repository.

     $ git clone git@github.com:ocelotconsulting/node-acme-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