npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@operator-error/pulumi-lambda-cert

v1.0.1

Published

Maintain Let's Encrypt certificates using Lambda

Downloads

3

Readme

@operator-error/pulumi-lambda-cert

This is a package containing components for use with Pulumi, a tool for provisioning cloud infrastructure based on a description written with general purpose programming languages.

This package provides a component named LambdaCert, which can be used to create the resources needed to run Lambda Cert, a function for maintaining Let's Encrypt certificates using AWS Lambda.

Usage

import { LambdaCert, LambdaCertOutputs, letsEncryptV2ProductionUrl } from "@operator-error/pulumi-lambda-cert"

async function main(): Promise<LambdaCertOutputs> {
	return await LambdaCert.create("vault", {
		// A Description of the purpose of this configuration (e.g. "Vault", "HAProxy"). Used in Tags.
		description: "Vault",

		// These tags will be applied to every object which supports tagging.
		// Avoid using `Name`, since this will be overridden by many components.
		baseTags: {
			Project: "Staging Vault",
		},

		// The part of the domain name for which a certificate is required which does _not_
		// form part of the hosted zone name. For example, if requesting a certificate for
		// `*.vault.operator-error.com`, and the public hosted zone is for `operator-error.com`,
		// `domainNamePrefix` should be set to `*.vault` (without a trailing `.`).
		domainNamePrefix: "vault-staging",
		// The part of the domain name for which a certificate is required which is included
		// in the hosted zone name.
		route53DomainName: "operator-error.com",

		// The admin email address to provide to the ACME service when creating an account.
		adminEmail: "[email protected]",

		// The URL of the ACME server. Defaults to Let's Encrypt ACME V2 Staging. Constants
		// are exported from the package for both Let's Encrypt staging and production.
		acmeUrl: letsEncryptV2ProductionUrl,

		// If set to true, add the certificate to an Java KeyStore encrypted with the same
		// KMS key as the private key, and uploaded to the bucket along with the certificate
		// and encrypted private key.
		generateJavaKeyStore: true,

		// If set to true, force delete the entire contents of the bucket when destroying
		// the component using Pulumi. This can be useful for quick iteration in development
		// when using a staging endpoint, though be wary of rate limits when using a real
		// ACME service.
		emptyBucketOnDestroy: true,
	});
}

const outputs = main();
export const keyBucketArn = outputs.then(o => o.keyBucketArn);
export const keyBucketName = outputs.then(o => o.keyBucketName);
export const kmsKeyArn = outputs.then(o => o.kmsKeyArn);
export const kmsKeyId = outputs.then(o => o.kmsKeyId);

Running a pulumi preview of the above program in the us-west-2 region results in the following:

❯ pulumi preview
Previewing update of stack 'vault-staging'
Previewing changes:

     Type                                 Name                                   Plan       Info
 +   pulumi:pulumi:Stack                  pulumi-lambda-cert-test-vault-staging  create
 +   └─ operator-error:aws:LambdaCert     vault-lambda-cert                      create
 +      ├─ aws:iam:Role                   vault-lambda-cert-function-role        create
 +      │  └─ aws:iam:RolePolicy          vault-lambda-cert-function-policy      create
 +      ├─ aws:kms:Key                    vault-lambda-cert-kms-key              create
 +      ├─ aws:s3:Bucket                  vault-lambda-cert-bucket               create
 +      ├─ aws:lambda:Function            vault-lambda-cert-function             create
 +      │  └─ aws:lambda:Permission       vault-lambda-cert-permission           create
 +      └─ aws:cloudwatch:EventRule       vault-lambda-cert-schedule             create
 +         └─ aws:cloudwatch:EventTarget  vault-lambda-cert-target               create

info: 10 changes previewed:
    + 10 resources to create

License

This package is licensed under the Mozilla Public License, v2.0.

Contributing

Please feel free to open issues or pull requests on GitHub.