Skip to main content

CDK constructs for defining an interaction between an Amazon Route53 domain and an Application Load Balancer.

Project description

aws-route53-alb module

---

Stability: Experimental

All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


Reference Documentation: https://docs.aws.amazon.com/solutions/latest/constructs/
Language Package
Python Logo Python aws_solutions_constructs.aws_route53_alb
Typescript Logo Typescript @aws-solutions-constructs/aws-route53-alb
Java Logo Java software.amazon.awsconstructs.services.route53alb

This AWS Solutions Construct implements an Amazon Route53 Hosted Zone routing to an Application Load Balancer

Here is a minimal deployable pattern definition in Typescript:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_solutions_constructs.aws_route53_alb import Route53ToAlb

Route53ToAlb(self, "Route53ToAlbPattern",
    private_hosted_zone_props={
        "zone_name": "www.example.com"
    },
    public_api=False
)

Initializer

new Route53ToAlb(scope: Construct, id: string, props: Route53ToAlbProps);

Parameters

Pattern Construct Props

This construct cannot create a new Public Hosted Zone, if you are creating a public API you must supply an existing Public Hosted Zone that will be reconfigured with a new Alias record. Public Hosted Zones are configured with public domain names and are not well suited to be launched and torn down dynamically, so this construct will only reconfigure existing Public Hosted Zones.

This construct can create Private Hosted Zones. If you want a Private Hosted Zone, then you can either provide an existing Private Hosted Zone or a privateHostedZoneProps value with at least the Domain Name defined.

Name Type Description
privateHostedZoneProps? route53.PrivateHostedZoneProps Optional custom properties for a new Private Hosted Zone. Cannot be specified for a public API. Cannot specify a VPC, it will use the VPC in existingVpc or the VPC created by the construct. Providing both this and existingHostedZoneInterfaceis an error.
existingHostedZoneInterface? route53.IHostedZone Existing Public or Private Hosted Zone (type must match publicApi setting). Specifying both this and privateHostedZoneProps is an error. If this is a Private Hosted Zone, the associated VPC must be provided as the existingVpc property
loadBalancerProps? elasticloadbalancingv2.ApplicationLoadBalancerProps Optional custom properties for a new loadBalancer. Providing both this and existingLoadBalancer is an error. This cannot specify a VPC, it will use the VPC in existingVpc or the VPC created by the construct.
existingLoadBalancerObj? elasticloadbalancingv2.ApplicationLoadBalancer Existing Application Load Balancer to incorporate into the construct architecture. Providing both this and loadBalancerProps is an error. The VPC containing this loadBalancer must match the VPC provided in existingVpc.
vpcProps? ec2.VpcProps Optional custom properties for a VPC the construct will create. This VPC will be used by the new ALB and any Private Hosted Zone the construct creates (that's why loadBalancerProps and privateHostedZoneProps can't include a VPC). Providing both this and existingVpc is an error.
existingVpc? ec2.IVpc An existing VPC in which to deploy the construct. Providing both this and vpcProps is an error. If the client provides an existing load balancer and/or existing Private Hosted Zone, those constructs must exist in this VPC.
logAlbAccessLogs? boolean Whether to turn on Access Logs for the Application Load Balancer. Uses an S3 bucket with associated storage costs.Enabling Access Logging is a best practice. default - true
albLoggingBucketProps? s3.BucketProps Optional properties to customize the bucket used to store the ALB Access Logs. Supplying this and setting logAccessLogs to false is an error. @default - none

| publicApi | boolean | Whether the construct is deploying a private or public API. This has implications for the Hosted Zone, VPC and ALB. |

Pattern Properties

Name Type Description
hostedZone route53.IHostedZone The hosted zone used by the construct (whether created by the construct or providedb by the client)
vpc ec2.IVpc The VPC used by the construct (whether created by the construct or providedb by the client)
loadBalancer elasticloadbalancingv2.ApplicationLoadBalancer The Load Balancer used by the construct (whether created by the construct or providedb by the client)

Default settings

Out of the box implementation of the Construct without any override will set the following defaults:

Amazon Route53

  • Adds an ALIAS record to the new or provided Hosted Zone that routes to the construct's ALB

Application Load Balancer

  • Creates an Application Load Balancer with no Listener or target. The consruct can incorporate an existing, fully configured ALB if provided.

Architecture

Architecture Diagram


© Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.

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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file aws-solutions-constructs.aws_route53_alb-2.0.0rc2.tar.gz.

File metadata

  • Download URL: aws-solutions-constructs.aws_route53_alb-2.0.0rc2.tar.gz
  • Upload date:
  • Size: 340.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.5

File hashes

Hashes for aws-solutions-constructs.aws_route53_alb-2.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 e50f35ef13a89a1c331a08d8c400da1931fcff4d6df67fa6d17ab28ecb7ab2a4
MD5 3add2d4c70a8a747bd77ff6f169c8916
BLAKE2b-256 9f3943da20d8b999f8b7837a4abf6ea6e0c25b9f8f00069d3164961124d8265f

See more details on using hashes here.

File details

Details for the file aws_solutions_constructs.aws_route53_alb-2.0.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_solutions_constructs.aws_route53_alb-2.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 5711fc3ef84e9dc0b5114c22bc29ca9a5be0b0a5d2c42726af96b3e44f28d18d
MD5 252ae46f36dc4c2dd32d70f205cff557
BLAKE2b-256 16a25fa31bcc8b103c8466516e1c14765c9ca848b7db42b372fed8e0dcf4240d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page