CDK Constructs for AWS Route53 Alias Targets
Project description
Route53 Alias Record Targets for the CDK Route53 Library
---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
Built Distribution
Close
Hashes for aws-cdk.aws-route53-targets-1.13.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7b01b2afed7fc8ea294dcbe8d5d77072aef42149beb36ab715b642f1b289984 |
|
MD5 | 0666f98c43ce4f3e1a476f6bb6114303 |
|
BLAKE2b-256 | 4a00d665df8de3910c42afef0e7a269291edfb750898164154be802f4946a58e |
Close
Hashes for aws_cdk.aws_route53_targets-1.13.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8180f9dc117d1e824884c41a568433a4961f824b637bd281b4683b920e676a5 |
|
MD5 | dccad56b65970fed39c01ec69a7883e8 |
|
BLAKE2b-256 | 969074d8e1855560fc767c5f5eea510fd87fb8d52bd07e6e0dd16114acfa74f3 |