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 may have issues. 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 may have issues. 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 may have issues. 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 may have issues. See https://github.com/aws/jsii/issues/826
    route53.ARecord(self, "AliasRecord",
        zone=zone,
        target=route53.RecordTarget.from_alias(alias.ClassicLoadBalancerTarget(elb))
    )
    
  • S3 Bucket WebSite:

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

# Example may have issues. 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.13.1.tar.gz (34.1 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.13.1-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aws-cdk.aws-route53-targets-1.13.1.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.5

File hashes

Hashes for aws-cdk.aws-route53-targets-1.13.1.tar.gz
Algorithm Hash digest
SHA256 03695b40358c31244ef90af0544b8e872690c45a96ac76797111e79ba71a26ea
MD5 86c7969f41f5b38bdbfd84bb6a1e53f7
BLAKE2b-256 9fc775334696e705ed3d5b6852ac61eca785effeaa8066039a4e95ffa6aa5b99

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aws_cdk.aws_route53_targets-1.13.1-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.5

File hashes

Hashes for aws_cdk.aws_route53_targets-1.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e5d2aae7e3c7685019d548635b0f1d2177b75f4f466c383cfb36f40697dc482c
MD5 0fc6d71ac46d8a8717e2450827ad7af4
BLAKE2b-256 b870f3209d68add8c2cc56a558a0d123b0ea5cdb110f207078b16861d2fcdc2f

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