AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

ApplicationListener

Define an ApplicationListener.

Import

import { ApplicationListener } from 'aws-cdk-lib/aws-elasticloadbalancingv2';

Or use the module namespace:

import * as elasticloadbalancingv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';
// elasticloadbalancingv2.ApplicationListener

Properties

Configuration passed to the constructor as ApplicationListenerProps.

loadBalancerRequired
IApplicationLoadBalancer

The load balancer to attach this listener to.

8 properties inherited from BaseApplicationListenerProps
certificatesOptionalinherited from BaseApplicationListenerProps
IListenerCertificate[]

Certificate list of ACM cert ARNs. You must provide exactly one certificate if the listener protocol is HTTPS or TLS.

Default: - No certificates.

defaultActionOptionalinherited from BaseApplicationListenerProps
ListenerAction

Default action to take for requests to this listener. This allows full control of the default action of the load balancer, including Action chaining, fixed responses and redirect responses. See the `ListenerAction` class for all options. Cannot be specified together with `defaultTargetGroups`.

Default: - None.

defaultTargetGroupsOptionalinherited from BaseApplicationListenerProps
IApplicationTargetGroup[]

Default target groups to load balance to. All target groups will be load balanced to with equal weight and without stickiness. For a more complex configuration than that, use either `defaultAction` or `addAction()`. Cannot be specified together with `defaultAction`.

Default: - None.

mutualAuthenticationOptionalinherited from BaseApplicationListenerProps
MutualAuthentication

The mutual authentication configuration information.

Default: - No mutual authentication configuration

openOptionalinherited from BaseApplicationListenerProps
boolean

Allow anyone to connect to the load balancer on the listener port. If this is specified, the load balancer will be opened up to anyone who can reach it. For internal load balancers this is anyone in the same VPC. For public load balancers, this is anyone on the internet. If you want to be more selective about who can access this load balancer, set this to `false` and use the listener's `connections` object to selectively grant access to the load balancer on the listener port.

Default: true

portOptionalinherited from BaseApplicationListenerProps
number

The port on which the listener listens for requests.

Default: - Determined from protocol if known.

protocolOptionalinherited from BaseApplicationListenerProps
ApplicationProtocol

The protocol to use.

Default: - Determined from port if known.

sslPolicyOptionalinherited from BaseApplicationListenerProps
SslPolicy

The security policy that defines which ciphers and protocols are supported.

Default: - The current predefined security policy.

Get the Elastic Load Balancing V2 Cheat Sheet

Everything you need to know about Elastic Load Balancing V2 on one page. HD quality, print-friendly.

Download Free Infographic