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)) )
-
InterfaceVpcEndpoints
Important: Based on the CFN docs for VPCEndpoints - see here - the attributes returned for DnsEntries in CloudFormation is a combination of the hosted zone ID and the DNS name. The entries are ordered as follows: regional public DNS, zonal public DNS, private DNS, and wildcard DNS. This order is not enforced for AWS Marketplace services, and therefore this CDK construct is ONLY guaranteed to work with non-marketplace services.
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
route53.ARecord(stack, "AliasRecord",
zone=zone,
target=route53.RecordTarget.from_alias(alias.InterfaceVpcEndpointTarget(interface_vpc_endpoint))
)
- 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))
)
-
User pool domain
# 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.UserPoolDomainTarget(domain)) )
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
Hashes for aws-cdk.aws-route53-targets-1.35.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9f9fecee0ae1d231a0642db9febda80d76d81c2297f9b77fe8e248ef299b8c4 |
|
MD5 | 572967eb3a23ee28532261e94d05d821 |
|
BLAKE2b-256 | 6544c06b97b5ccec8fcee72d43e5b3580f00391b67746c6055fc76e67ecbc437 |
Hashes for aws_cdk.aws_route53_targets-1.35.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d606b22830466f36c56e2d26e6cb1c219d0608c7a8cae1b15c5e4a67df15607 |
|
MD5 | 232eef6da3e8be7d78ffd391c2e4a251 |
|
BLAKE2b-256 | 80fbf4bc506dea4558a0f689d3e19b2d4d4a670b505b1345d325c8aa10114e4f |