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.19.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 509a884afb53d9604f6a3c12321850872ae9cb6a37a97e14331a65ed123f94f8 |
|
MD5 | 4ffa714ba763aa091d75704fdd9a3f8d |
|
BLAKE2b-256 | 03170bad357e64e5fb0218385ab0d6c065347ecc330cb9a1e59f47c4921a0c73 |
Close
Hashes for aws_cdk.aws_route53_targets-1.19.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d83d95005cc1d5d89ef03377179583fa9a0cb417d6a9ffab03d2f227c61e37bc |
|
MD5 | b08f0ac42df665e8465cb473ba72978b |
|
BLAKE2b-256 | 850b611b5d54f1865701d9a4420a0c4df6420bc1bee9e660c08c64f7f24e3ea5 |