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.21.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9ed60f4bed44c0641bb22e0f24e904bfce08a72cbfe2557fc8eea04b52d1364 |
|
MD5 | 6afb6a9d36243e6a243b930bbfa11d3c |
|
BLAKE2b-256 | b3d925650a29d4db11f03fc9631fa5c0e653b4a4401b02a4118ad8570cee27ef |
Close
Hashes for aws_cdk.aws_route53_targets-1.21.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdb1725b5d9ca601782a505270c56aaca1cde9b40eb44b737f7389e9bbce1850 |
|
MD5 | f0db19b0e146c7e5ff8db892fbf4b656 |
|
BLAKE2b-256 | 16b83027585c1634a8504ec0ce41b37e5fadc67a50374467cc3d4faac3efa647 |