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.17.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ec54b415805b34696c360170de007371e5b1c2cfdfaa731f8d05e629aaf9020 |
|
MD5 | 8471fa2f33f15cb34a649ed970cd79fc |
|
BLAKE2b-256 | 5a965fc2d349e59d7f7104e34e4a77d1e09866c1b890da7d17c408a566b347e7 |
Close
Hashes for aws_cdk.aws_route53_targets-1.17.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad418ed683647fc5ecf15c0e8e0c49c7815c9bce20973fb8e910cd85f812a8ec |
|
MD5 | 38f36db0312bf95581a7ca8641e0bab2 |
|
BLAKE2b-256 | c7a5eea15c01c0cfa574c31b7c9495e4603c7dc2c0d7bacda2f64fa2890864ae |