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 may have issues. 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 may have issues. 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 may have issues. 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 may have issues. 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 may have issues. 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.14.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c374bb414a42ab3867d7174e55c6dbbf25cfed1e9a104bfa4c966c59890ce52 |
|
MD5 | dfc9d56788093c3e264303cf6bc4dd83 |
|
BLAKE2b-256 | dd2589f46eb35f81d80a287add50aaf577964ac8cbc6765a9f14a315e695881c |
Close
Hashes for aws_cdk.aws_route53_targets-1.14.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfe90a9da63a452450d1ccfd84746448c4e002e6ce020a482e5cfa1de9cc1099 |
|
MD5 | 15841e4f671ffa0f76c1143d4b111cb1 |
|
BLAKE2b-256 | efae1c110a9fc694f60bea64e9b2a09b3073b716484f1b3b0525336e1fcd2b0c |