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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03695b40358c31244ef90af0544b8e872690c45a96ac76797111e79ba71a26ea |
|
MD5 | 86c7969f41f5b38bdbfd84bb6a1e53f7 |
|
BLAKE2b-256 | 9fc775334696e705ed3d5b6852ac61eca785effeaa8066039a4e95ffa6aa5b99 |
Close
Hashes for aws_cdk.aws_route53_targets-1.13.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5d2aae7e3c7685019d548635b0f1d2177b75f4f466c383cfb36f40697dc482c |
|
MD5 | 0fc6d71ac46d8a8717e2450827ad7af4 |
|
BLAKE2b-256 | b870f3209d68add8c2cc56a558a0d123b0ea5cdb110f207078b16861d2fcdc2f |