Skip to main content

The CDK Construct Library for AWS::CertificateManager

Project description

Amazon Certificate Manager Construct Library

---

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

# Example automatically generated. See https://github.com/aws/jsii/issues/826
cert = certmgr.Certificate(self, "Certificate",
    domain_name="example.com"
)

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, 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.

The CDK also provides a custom resource which can be used for automatic validation if the DNS records for the domain are managed through Route53 (see below).

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 Amazon Certificate Manager User Guide.

DNS validation

DNS-validated certificates are validated by configuring appropriate DNS records for your domain.

See Validate with DNS in the Amazon Certificate Manager User Guide.

Automatic DNS-validated certificates using Route53

The DnsValidatedCertificateRequest class provides a Custom Resource by which you can request a TLS certificate from AWS Certificate Manager that is automatically validated using a cryptographically secure DNS record. For this to work, there must be a Route 53 public zone that is responsible for serving records under the Domain Name of the requested certificate. For example, if you request a certificate for www.example.com, there must be a Route 53 public zone example.com that provides authoritative records for the domain.

Example:

# Example automatically generated. See https://github.com/aws/jsii/issues/826
hosted_zone = route53.HostedZone.from_lookup(self, "HostedZone",
    domain_name="example.com",
    private_zone=False
)

certificate = certmgr.DnsValidatedCertificate(self, "TestCertificate",
    domain_name="test.example.com",
    hosted_zone=hosted_zone
)

Importing

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

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
arn = "arn:aws:..."
certificate = Certificate.from_certificate_arn(self, "Certificate", arn)

Sharing between Stacks

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-cdk.aws-certificatemanager-1.20.0.tar.gz (235.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_cdk.aws_certificatemanager-1.20.0-py3-none-any.whl (233.7 kB view details)

Uploaded Python 3

File details

Details for the file aws-cdk.aws-certificatemanager-1.20.0.tar.gz.

File metadata

  • Download URL: aws-cdk.aws-certificatemanager-1.20.0.tar.gz
  • Upload date:
  • Size: 235.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.5

File hashes

Hashes for aws-cdk.aws-certificatemanager-1.20.0.tar.gz
Algorithm Hash digest
SHA256 22f702a982f0ff668348f5d14355373ece7b0d5bcdb86867e2dfb586eb3a27f8
MD5 4007d231b3fc7591398adf28a68d406b
BLAKE2b-256 37b7c2fd3b6b404f9386fb80be51d4ec131da11d4d2a6b8fdd9aca5ac4530b79

See more details on using hashes here.

File details

Details for the file aws_cdk.aws_certificatemanager-1.20.0-py3-none-any.whl.

File metadata

  • Download URL: aws_cdk.aws_certificatemanager-1.20.0-py3-none-any.whl
  • Upload date:
  • Size: 233.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.5

File hashes

Hashes for aws_cdk.aws_certificatemanager-1.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 893ea555bbd0e26e6ba5bb05d8a64866423073b08dad4a1079da22bd81fddf41
MD5 4b011739ca4b116d82c90e88afcd5456
BLAKE2b-256 b7869d06992866f04d4335493af07a75efa4084338c47c9477c7499021ca541e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page