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.16.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f128572fb41a1b84e70c2f50db3d39da6a8044885f5cfa8d89e7522b624a320c |
|
MD5 | e9156c8d944c99f40aa349747e445a70 |
|
BLAKE2b-256 | d78ee79799d181d37d10aa67237dd5ab2b255a350b6184de940bc8b731c1c2b9 |
Close
Hashes for aws_cdk.aws_route53_targets-1.16.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00f5268e686224b3dceb615ce21558c6c6ae22e22346925e72cd9aa7a368c016 |
|
MD5 | 6e006a664ec979d7adbe3da00cdf462d |
|
BLAKE2b-256 | e26fd9c5c7a5dacaf526666881474fb6b477f6649b186fe9df89aeef9be79e89 |