Skip to content

Latest commit

 

History

History
468 lines (271 loc) · 11.6 KB

API.md

File metadata and controls

468 lines (271 loc) · 11.6 KB

API Reference

Constructs

Certbot

Initializers

import { Certbot } from '@renovosolutions/cdk-library-certbot'

new Certbot(scope: Construct, id: string, props: CertbotProps)
scopeRequired

idRequired
  • Type: string

propsRequired

Properties

handlerRequired
public readonly handler: Function;

Structs

CertbotProps

Initializer

import { CertbotProps } from '@renovosolutions/cdk-library-certbot'

const certbotProps: CertbotProps = { ... }
letsencryptDomainsRequired
public readonly letsencryptDomains: string;
  • Type: string

The comma delimited list of domains for which the Let's Encrypt certificate will be valid.

Primary domain should be first.


letsencryptEmailRequired
public readonly letsencryptEmail: string;
  • Type: string

The email to associate with the Let's Encrypt certificate request.


architectureOptional
public readonly architecture: Architecture;

The architecture for the Lambda function.

This property allows you to specify the architecture type for your Lambda function. Supported values are 'x86_64' for the standard architecture and 'arm64' for the ARM architecture.


bucketOptional
public readonly bucket: Bucket;

The S3 bucket to place the resulting certificates in.

If no bucket is given one will be created automatically.


certificateStorageOptional
public readonly certificateStorage: CertificateStorageType;

The method of storage for the resulting certificates.


efsAccessPointOptional
public readonly efsAccessPoint: AccessPoint;

The EFS access point to store the certificates.


enableInsightsOptional
public readonly enableInsights: boolean;
  • Type: boolean
  • Default: false

Whether or not to enable Lambda Insights.


enableObjectDeletionOptional
public readonly enableObjectDeletion: boolean;
  • Type: boolean
  • Default: false

Whether or not to enable automatic object deletion if the provided bucket is deleted.

Has no effect if a bucket is given as a property


functionDescriptionOptional
public readonly functionDescription: string;
  • Type: string

The description for the resulting Lambda function.


functionNameOptional
public readonly functionName: string;
  • Type: string

The name of the resulting Lambda function.


hostedZoneNamesOptional
public readonly hostedZoneNames: string[];
  • Type: string[]

Hosted zone names that will be required for DNS verification with certbot.


hostedZonesOptional
public readonly hostedZones: IHostedZone[];

The hosted zones that will be required for DNS verification with certbot.


insightsARNOptional
public readonly insightsARN: string;
  • Type: string

Insights layer ARN for your region.

Defaults to layer for US-EAST-1


keyTypeOptional
public readonly keyType: string;
  • Type: string
  • Default: 'ecdsa'

Set the key type for the certificate.


kmsKeyAliasOptional
public readonly kmsKeyAlias: string;
  • Type: string
  • Default: AWS managed key

The KMS key to use for encryption of the certificates in Secrets Manager or Systems Manager Parameter Store.


layersOptional
public readonly layers: ILayerVersion[];

Any additional Lambda layers to use with the created function.

For example Lambda Extensions


objectPrefixOptional
public readonly objectPrefix: string;
  • Type: string

The prefix to apply to the final S3 key name for the certificates.

Default is no prefix. Also used for EFS.


preferredChainOptional
public readonly preferredChain: string;
  • Type: string
  • Default: 'None'

Set the preferred certificate chain.


reIssueDaysOptional
public readonly reIssueDays: number;
  • Type: number
  • Default: 30

The numbers of days left until the prior cert expires before issuing a new one.


removalPolicyOptional
public readonly removalPolicy: RemovalPolicy;

The removal policy for the S3 bucket that is automatically created.

Has no effect if a bucket is given as a property


runOnDeployOptional
public readonly runOnDeploy: boolean;
  • Type: boolean
  • Default: true

Whether or not to schedule a trigger to run the function after each deployment.


runOnDeployWaitMinutesOptional
public readonly runOnDeployWaitMinutes: number;
  • Type: number
  • Default: 10

How many minutes to wait before running the post deployment Lambda trigger.


scheduleOptional
public readonly schedule: Schedule;

The schedule for the certificate check trigger.


secretsManagerPathOptional
public readonly secretsManagerPath: string;
  • Type: string
  • Default: /certbot/certificates/${letsencryptDomains.split(',')[0]}/

The path to store the certificates in AWS Secrets Manager.


snsTopicOptional
public readonly snsTopic: Topic;

The SNS topic to notify when a new cert is issued.

If no topic is given one will be created automatically.


ssmSecurePathOptional
public readonly ssmSecurePath: string;
  • Type: string
  • Default: /certbot/certificates/${letsencryptDomains.split(',')[0]}/

The path to store the certificates in AWS Systems Manager Parameter Store.


timeoutOptional
public readonly timeout: Duration;

The timeout duration for Lambda function.


vpcOptional
public readonly vpc: IVpc;

The VPC to run the Lambda function in.

This is needed if you are using EFS. It should be the same VPC as the EFS filesystem


Enums

CertificateStorageType

SECRETS_MANAGER

Store the certificate in AWS Secrets Manager.


S3

Store the certificates in S3.


SSM_SECURE

Store the certificates as a parameter in AWS Systems Manager Parameter Store with encryption.


EFS

Store the certificates in EFS, mounted to the Lambda function.