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

@aws-cdk/aws-route53-targets

Package Overview
Dependencies
Maintainers
5
Versions
253
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-route53-targets

CDK Constructs for AWS Route53 Alias Targets

  • 1.27.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39K
decreased by-16.36%
Maintainers
5
Weekly downloads
 
Created
Source

Route53 Alias Record Targets for the CDK Route53 Library


Stability: Stable


This library contains Route53 Alias Record targets for:

  • API Gateway custom domains
    new route53.ARecord(this, 'AliasRecord', {
      zone,
      target: route53.RecordTarget.fromAlias(new alias.ApiGateway(restApi)),
      // or - route53.RecordTarget.fromAlias(new alias.ApiGatewayDomainName(domainName)),
    });
    
  • CloudFront distributions
    new route53.ARecord(this, 'AliasRecord', {
      zone,
      target: route53.RecordTarget.fromAlias(new alias.CloudFrontTarget(distribution)),
    });
    
  • ELBv2 load balancers
    new route53.ARecord(this, 'AliasRecord', {
      zone,
      target: route53.RecordTarget.fromAlias(new alias.LoadBalancerTarget(elbv2)),
      // or - route53.RecordTarget.fromAlias(new alias.ApiGatewayDomainName(domainName)),
    });
    
  • Classic load balancers
    new route53.ARecord(this, 'AliasRecord', {
      zone,
      target: route53.RecordTarget.fromAlias(new alias.ClassicLoadBalancerTarget(elb)),
      // or - route53.RecordTarget.fromAlias(new alias.ApiGatewayDomainName(domainName)),
    });
    
  • InterfaceVpcEndpoints

Important: Based on the CFN docs for VPCEndpoints - see here - the attributes returned for DnsEntries in CloudFormation is a combination of the hosted zone ID and the DNS name. The entries are ordered as follows: regional public DNS, zonal public DNS, private DNS, and wildcard DNS. This order is not enforced for AWS Marketplace services, and therefore this CDK construct is ONLY guaranteed to work with non-marketplace services.

new route53.ARecord(stack, "AliasRecord", {
  zone,
  target: route53.RecordTarget.fromAlias(new alias.InterfaceVpcEndpointTarget(interfaceVpcEndpoint))
});
  • S3 Bucket WebSite:

Important: The Bucket name must strictly match the full DNS name. See the Developer Guide for more info.

const [recordName, domainName] = ['www', 'example.com'];

const bucketWebsite = new Bucket(this, 'BucketWebsite', {
  bucketName: [recordName, domainName].join('.'), // www.example.com
  publicReadAccess: true,
  websiteIndexDocument: 'index.html',
});

const zone = HostedZone.fromLookup(this, 'Zone', {domainName}); // example.com

new route53.ARecord(this, 'AliasRecord', {
  zone,
  recordName, // www
  target: route53.RecordTarget.fromAlias(new alias.BucketWebsiteTarget(bucket)),
});

See the documentation of @aws-cdk/aws-route53 for more information.

Keywords

FAQs

Package last updated on 03 Mar 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