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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc9cae884f84df385bd0567aa153a69665b58d2c46a49eb6fe4dab3631aca07e |
|
MD5 | 51a1f63757218284c502896d8902971d |
|
BLAKE2b-256 | e42c2282ad69958dbceffdda03a1bcc4a53bac9dfe52d9a2b006bc14f558b9af |
Close
Hashes for aws_cdk.aws_route53_targets-1.16.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29d014994753832bd02881b48d72fc1e5ea0c09a1f10f0a40a7950aea5b0833a |
|
MD5 | ded791819090636c6f578412819e64d5 |
|
BLAKE2b-256 | 4cd359cf1ec2a6240846e410556ae272898d76efa6b1d8c9f4b73afc4b25f7a6 |