How to use the @aws-cdk/aws-certificatemanager.DnsValidatedCertificate function in @aws-cdk/aws-certificatemanager

To help you get started, we’ve selected a few @aws-cdk/aws-certificatemanager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / @aws-cdk / aws-ecs-patterns / lib / base / application-load-balanced-service-base.ts View on Github external
this.listener = this.loadBalancer.addListener('PublicListener', {
      protocol,
      open: true
    });
    this.targetGroup = this.listener.addTargets('ECS', targetProps);

    if (protocol === ApplicationProtocol.HTTPS) {
      if (typeof props.domainName === 'undefined' || typeof props.domainZone === 'undefined') {
        throw new Error('A domain name and zone is required when using the HTTPS protocol');
      }

      if (props.certificate !== undefined) {
        this.certificate = props.certificate;
      } else {
        this.certificate = new DnsValidatedCertificate(this, 'Certificate', {
          domainName: props.domainName,
          hostedZone: props.domainZone
        });
      }
    }
    if (this.certificate !== undefined) {
      this.listener.addCertificateArns('Arns', [this.certificate.certificateArn]);
    }

    let domainName = this.loadBalancer.loadBalancerDnsName;
    if (typeof props.domainName !== 'undefined') {
      if (typeof props.domainZone === 'undefined') {
        throw new Error('A Route53 hosted domain zone name is required to configure the specified domain name');
      }

      const record = new ARecord(this, "DNS", {

@aws-cdk/aws-certificatemanager

The CDK Construct Library for AWS::CertificateManager

Apache-2.0
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis