Define an Application Load Balancer.
import { ApplicationLoadBalancer } from 'aws-cdk-lib/aws-elasticloadbalancingv2';Or use the module namespace:
import * as elasticloadbalancingv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';
// elasticloadbalancingv2.ApplicationLoadBalancerConfiguration passed to the constructor as ApplicationLoadBalancerProps.
clientKeepAliveOptionalDurationThe client keep alive duration. The valid range is 60 to 604800 seconds (1 minute to 7 days).
Default: - Duration.seconds(3600)
desyncMitigationModeOptionalDesyncMitigationModeDetermines how the load balancer handles requests that might pose a security risk to your application.
Default: DesyncMitigationMode.DEFENSIVE
dropInvalidHeaderFieldsOptionalbooleanIndicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).
Default: false
http2EnabledOptionalbooleanIndicates whether HTTP/2 is enabled.
Default: true
idleTimeoutOptionalDurationThe load balancer idle timeout, in seconds.
Default: 60
ipAddressTypeOptionalIpAddressTypeThe type of IP addresses to use.
Default: IpAddressType.IPV4
preserveHostHeaderOptionalbooleanIndicates whether the Application Load Balancer should preserve the host header in the HTTP request and send it to the target without any change.
Default: false
preserveXffClientPortOptionalbooleanIndicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.
Default: false
securityGroupOptionalISecurityGroupSecurity group to associate with this load balancer.
Default: A security group is created
wafFailOpenOptionalbooleanIndicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF.
Default: false
xAmznTlsVersionAndCipherSuiteHeadersOptionalbooleanIndicates whether the two headers (x-amzn-tls-version and x-amzn-tls-cipher-suite), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. The x-amzn-tls-version header has information about the TLS protocol version negotiated with the client, and the x-amzn-tls-cipher-suite header has information about the cipher suite negotiated with the client. Both headers are in OpenSSL format.
Default: false
xffHeaderProcessingModeOptionalXffHeaderProcessingModeEnables you to modify, preserve, or remove the X-Forwarded-For header in the HTTP request before the Application Load Balancer sends the request to the target.
Default: XffHeaderProcessingMode.APPEND
BaseLoadBalancerPropsvpcRequiredinherited from BaseLoadBalancerPropsIVpcThe VPC network to place the load balancer in.
crossZoneEnabledOptionalinherited from BaseLoadBalancerPropsbooleanIndicates whether cross-zone load balancing is enabled.
Default: - false for Network Load Balancers and true for Application Load Balancers.
This can not be `false` for Application Load Balancers.
deletionProtectionOptionalinherited from BaseLoadBalancerPropsbooleanIndicates whether deletion protection is enabled.
Default: false
denyAllIgwTrafficOptionalinherited from BaseLoadBalancerPropsbooleanIndicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
Default: - false for internet-facing load balancers and true for internal load balancers
internetFacingOptionalinherited from BaseLoadBalancerPropsbooleanWhether the load balancer has an internet-routable address.
Default: false
loadBalancerNameOptionalinherited from BaseLoadBalancerPropsstringName of the load balancer.
Default: - Automatically generated name.
minimumCapacityUnitOptionalinherited from BaseLoadBalancerPropsnumberThe minimum capacity (LCU) for a load balancer.
Default: undefined - ELB default is 0 LCU
vpcSubnetsOptionalinherited from BaseLoadBalancerPropsSubnetSelectionWhich subnets place the load balancer in.
Default: - the Vpc default strategy.
Everything you need to know about Elastic Load Balancing V2 on one page. HD quality, print-friendly.
Download Free Infographicaws-elasticloadbalancingv2