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 automatically generated. 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 automatically generated. 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 automatically generated. 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 automatically generated. 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 automatically generated. 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.18.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 367254ca3b832ca424759929479d42336e0ba20392395da0a2eb00c352a19a42 |
|
MD5 | b615cf2646e65e688f16ef9ddd9354a1 |
|
BLAKE2b-256 | 7e861da5ac371e688951db0efe8bf73d189bba18d4b08b33d7e9da017989ecde |
Close
Hashes for aws_cdk.aws_route53_targets-1.18.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8f863055ed407c2f9f32a7717750dbef6c4189548bfa4886f8ddd9829486563 |
|
MD5 | 606a963225789105a0c3595bbe59c127 |
|
BLAKE2b-256 | 86a0158273b91913890597a35015ab12a8e484204d0101abb46bb55a37af4eb5 |