Skip to content

aws-elasticloadbalancingv2: Incorrect hardcoded maximum load balancer minimumCapacityUnit #34582

Closed
@jjant

Description

@jjant

Describe the bug

The minimumCapacityUnit has a hardcoded limit of 1500 units:

const minimumCapacityUnit = props.minimumCapacityUnit;
if (
minimumCapacityUnit &&
!Token.isUnresolved(minimumCapacityUnit) &&
(!Number.isInteger(minimumCapacityUnit) || minimumCapacityUnit < 100 || minimumCapacityUnit > 1500)
) {
throw new ValidationError(`'minimumCapacityUnit' must be a positive integer between 100 and 1500 for Application Load Balancer, got: ${minimumCapacityUnit}.`, this);
}

This is incorrect. This is a soft limit that can be increased, see documentation:

Load Balancer Capacity Units

The following quotas are for Load Balancer Capacity Units (LCU).

Name Default Adjustable
Reserved Application Load Balancer Capacity Units (LCUs) per Application Load Balancer 1500 Yes
Reserved Application Load Balancer Capacity Units (LCU) per Region 0 Yes

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

The library doesn't error out when you set a higher minimumCapacityUnit than 1500.

Current Behavior

It errors out.

Reproduction Steps

new ApplicationLoadBalancer(this, "LoadBalancer", {
  // ... params
  minimumCapacityUnit: 1501
})

Possible Solution

Remove the limit

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.191.0

AWS CDK CLI version

2.1011.0

Node.js Version

20

OS

OSX

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-elasticloadbalancingv2Related to Amazon Elastic Load Balancing V2bugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions