Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-cdk/aws-certificatemanager

Package Overview
Dependencies
Maintainers
5
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-certificatemanager

The CDK Construct Library for AWS::CertificateManager

  • 1.57.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
69K
increased by1.57%
Maintainers
5
Weekly downloads
 
Created
Source

AWS Certificate Manager Construct Library


cfn-resources: Stable

cdk-constructs: Stable


This package provides Constructs for provisioning and referencing certificates which can be used in CloudFront and ELB.

The following requests a certificate for a given domain:

request a certificate example

After requesting a certificate, you will need to prove that you own the domain in question before the certificate will be granted. The CloudFormation deployment will wait until this verification process has been completed.

Because of this wait time, when using manual validation methods, it's better to provision your certificates either in a separate stack from your main service, or provision them manually and import them into your CDK application.

Email validation

Email-validated certificates (the default) are validated by receiving an email on one of a number of predefined domains and following the instructions in the email.

See Validate with Email in the AWS Certificate Manager User Guide.

DNS validation

If Amazon Route 53 is your DNS provider for the requested domain, the DNS record can be created automatically:

new Certificate(this, 'Certificate', {
  domainName: 'hello.example.com',
  validation: CertificateValidation.fromDns(myHostedZone), // Route 53 hosted zone
});

Otherwise DNS records must be added manually and the stack will not complete creating until the records are added.

new Certificate(this, 'Certificate', {
  domainName: 'hello.example.com',
  validation: CertificateValidation.fromDns(), // Records must be added manually
});

See also Validate with DNS in the AWS Certificate Manager User Guide.

When working with multiple domains, use the CertificateValidation.fromDnsMultiZone():

multiple domains DNS validation

Use the DnsValidatedCertificate construct for cross-region certificate creation:

new DnsValidatedCertificate(this, 'CrossRegionCertificate', {
  domainName: 'hello.example.com',
  hostedZone: myHostedZone,
  region: 'us-east-1',
});

This is useful when deploying a stack in a region other than us-east-1 with a certificate for a CloudFront distribution.

If cross-region is not needed, the recommended solution is to use the Certificate construct which uses a native CloudFormation implementation.

Importing

If you want to import an existing certificate, you can do so from its ARN:

const arn = "arn:aws:...";
const certificate = Certificate.fromCertificateArn(this, 'Certificate', arn);

Sharing between Stacks

To share the certificate between stacks in the same CDK application, simply pass the Certificate object between the stacks.

Keywords

FAQs

Package last updated on 07 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc