AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ElasticLoadBalancingV2::Listener

CfnListener

Specifies a listener for an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as CfnListenerProps.

defaultActionsRequired
IResolvable | IResolvable | ActionProperty[]

The actions for the default rule. You cannot define a condition for a default rule. To create additional rules for an Application Load Balancer, use [AWS::ElasticLoadBalancingV2::ListenerRule](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html) .

loadBalancerArnRequired
string | ILoadBalancerRef

The Amazon Resource Name (ARN) of the load balancer.

alpnPolicyOptional
string[]

[TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy.

certificatesOptional
IResolvable | IResolvable | CertificateProperty[]

The default SSL server certificate for a secure listener. You must provide exactly one certificate if the listener protocol is HTTPS or TLS. For an HTTPS listener, update requires some interruptions. For a TLS listener, update requires no interruption. To create a certificate list for a secure listener, use [AWS::ElasticLoadBalancingV2::ListenerCertificate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenercertificate.html) .

listenerAttributesOptional
IResolvable | IResolvable | ListenerAttributeProperty[]

The listener attributes. Attributes that you do not modify retain their current values.

mutualAuthenticationOptional
IResolvable | MutualAuthenticationProperty

The mutual authentication configuration information.

portOptional
number

The port on which the load balancer is listening. You can't specify a port for a Gateway Load Balancer.

protocolOptional
string

The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, TCP_UDP, QUIC, and TCP_QUIC. You can’t specify the UDP, TCP_UDP, QUIC, or TCP_QUIC protocol if dual-stack mode is enabled. You can't specify a protocol for a Gateway Load Balancer.

sslPolicyOptional
string

[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. For more information, see [Security policies](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html) in the *Application Load Balancers Guide* and [Security policies](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/describe-ssl-policies.html) in the *Network Load Balancers Guide* . [HTTPS listeners] Updating the security policy can result in interruptions if the load balancer is handling a high volume of traffic. To decrease the possibility of an interruption if your load balancer is handling a high volume of traffic, create an additional load balancer or request an LCU reservation.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

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