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.15.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29c1d59c82aea43bca0b6da1bbaf9f0c4ef86f0084bb736d1819b46a4e651b29 |
|
MD5 | 037a51415b34d0fcc790b4de5f0a3440 |
|
BLAKE2b-256 | b6c8e7d6a65750ddc6bdd30a4a8d406ff717a130e9e5671e2b8086b0defbea7a |
Close
Hashes for aws_cdk.aws_route53_targets-1.15.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbe71d680da0451a2ca6cbeb20bd726f8e19498774f50b0e4344a802f184b1de |
|
MD5 | 584fa9db6c0f5a8e5618fb696967b0b7 |
|
BLAKE2b-256 | 7c4b10ec025470d270e55d31735bd7423ec459bc5f9a9e44f99153d9291e2131 |