Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

CDK Constructs for AWS Route53 Alias Targets

Project description

Route53 Alias Record Targets for the CDK Route53 Library

<html></html>---

Stability: Stable


<html></html>

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aws-cdk.aws-route53-targets, version 1.16.2
Filename, size File type Python version Upload date Hashes
Filename, size aws_cdk.aws_route53_targets-1.16.2-py3-none-any.whl (33.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size aws-cdk.aws-route53-targets-1.16.2.tar.gz (34.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page