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 without compilation. 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 without compilation. 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 without compilation. 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 without compilation. 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 without compilation. 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.20.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7a35720e3d7789ae5e09ad83e69a839ca81ab5231ba1a980a05e72d483b34a4 |
|
MD5 | 06bac2234a740c219ca516be8b1d7a8c |
|
BLAKE2b-256 | ef43de688b127ab11e589e4ca483cbde86ea727c745df4fd3a852ea1d2f4b029 |
Close
Hashes for aws_cdk.aws_route53_targets-1.20.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a2d0c1325ba5654a40d419b8cb27cfdf975ebfca6127d97286a84e0f91a45cf |
|
MD5 | 69be3d0832cac2d78cdd93ceab0db7d8 |
|
BLAKE2b-256 | dd7b29f9cc7e9460087ddbb8926b0d4c3a3e87600c284eca9e6f360271931479 |