Skip to main content

CDK Constructs for AWS Route53 Alias Targets

Project description

Route53 Alias Record Targets for the CDK Route53 Library

---

Stability: Stable


This library contains Route53 Alias Record targets for:

  • API Gateway custom domains

    # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
    route53.ARecord(self, "AliasRecord",
        zone=zone,
        target=route53.RecordTarget.from_alias(alias.ApiGateway(rest_api))
    )
    
  • CloudFront distributions

    # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
    route53.ARecord(self, "AliasRecord",
        zone=zone,
        target=route53.RecordTarget.from_alias(alias.CloudFrontTarget(distribution))
    )
    
  • ELBv2 load balancers

    # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
    route53.ARecord(self, "AliasRecord",
        zone=zone,
        target=route53.RecordTarget.from_alias(alias.LoadBalancerTarget(elbv2))
    )
    
  • Classic load balancers

    # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
    route53.ARecord(self, "AliasRecord",
        zone=zone,
        target=route53.RecordTarget.from_alias(alias.ClassicLoadBalancerTarget(elb))
    )
    
  • 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.

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
route53.ARecord(stack, "AliasRecord",
    zone=zone,
    target=route53.RecordTarget.from_alias(alias.InterfaceVpcEndpointTarget(interface_vpc_endpoint))
)
  • S3 Bucket WebSite:

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

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
[recordName, domainName] = ["www", "example.com"]

bucket_website = Bucket(self, "BucketWebsite",
    bucket_name=[record_name, domain_name].join("."), # www.example.com
    public_read_access=True,
    website_index_document="index.html"
)

zone = HostedZone.from_lookup(self, "Zone", domain_name=domain_name)# example.com

route53.ARecord(self, "AliasRecord",
    zone=zone,
    record_name=record_name, # www
    target=route53.RecordTarget.from_alias(alias.BucketWebsiteTarget(bucket))
)

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

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-route53-targets-1.27.0.tar.gz (39.7 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_route53_targets-1.27.0-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file aws-cdk.aws-route53-targets-1.27.0.tar.gz.

File metadata

  • Download URL: aws-cdk.aws-route53-targets-1.27.0.tar.gz
  • Upload date:
  • Size: 39.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.5

File hashes

Hashes for aws-cdk.aws-route53-targets-1.27.0.tar.gz
Algorithm Hash digest
SHA256 e5557bdb79d990fc33913ca461e43ae3af28ed03e0e8409d0023c372c071bb6b
MD5 11be966a07271010597b50444a530d2a
BLAKE2b-256 675cdde0f486d47e96e121de9b0ec5d075765ff5ab984121cc8b6cc8ca9d6f2d

See more details on using hashes here.

File details

Details for the file aws_cdk.aws_route53_targets-1.27.0-py3-none-any.whl.

File metadata

  • Download URL: aws_cdk.aws_route53_targets-1.27.0-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.5

File hashes

Hashes for aws_cdk.aws_route53_targets-1.27.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97b6353d9b622b4d44d8fb4a8c5f8896f65ce2c449009eed15d84c643735cc34
MD5 6a8cbe3172c533624174e125635b4a5c
BLAKE2b-256 96bf49300441b5b371b4563d697276290e60ce30685c67cc83a46a51c3487b68

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