-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(elasticloadbalancingv2): minimum Loadbalancer Capacity Unit (LCU) reservation #32382
base: main
Are you sure you want to change the base?
Conversation
I've requested for reserved minimum LCU quotas to execute integ test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32382 +/- ##
=======================================
Coverage 80.84% 80.84%
=======================================
Files 232 232
Lines 14135 14135
Branches 2460 2460
=======================================
Hits 11428 11428
Misses 2427 2427
Partials 280 280
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
if ( | ||
minimumCapacityUnit && | ||
!Token.isUnresolved(minimumCapacityUnit) && | ||
(minimumCapacityUnit < 100 || minimumCapacityUnit > 1500) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To set invalid LCU causes deployment failure.
Failed resources:
MinimumCapacityUnitAlbStack | 10:09:09 PM | CREATE_FAILED | AWS::ElasticLoadBalancingV2::LoadBalancer | LB (LB8A12904C) Resource handler returned message: "CapacityUnits value must be between 100 and 1500, inclusive for load balancers of type 'application` (Service: ElasticLoadBalancingV2, Status Code: 400, Request ID: 5d0ee330-3b5c-4100-81c2-8d41d8a78065)" (RequestToken: 5c14d4bf-6259-f3d5-e9b3-9db4449cff9d, HandlerErrorCode: InvalidRequest)
|
||
if (minimumCapacityUnit && !Token.isUnresolved(minimumCapacityUnit)) { | ||
const capacityUnitPerAz = minimumCapacityUnit / (props.vpc?.availabilityZones.length ?? 1); | ||
if (capacityUnitPerAz < 2750 || capacityUnitPerAz > 45000) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To set invalid minimum capacity unit causes deployment failure.
Failed resources:
MinimumCapacityUnitNlbStack | 8:09:17 PM | CREATE_FAILED | AWS::ElasticLoadBalancingV2::LoadBalancer | LB (LB8A12904C) Resource handler returned message: "For load balancer type 'network`, CapacityUnits must be distributed at each zone between 2750 and 45000. (Service: ElasticLoadBalancingV2, Status Code: 400, Request ID: fe443fa7-f642-4f38-b9ca-3d8ce50b830e)" (RequestToken: 35fe4839-faa1-b459-ebd8-8f8553ab3cce, HandlerErrorCode: InvalidRequest)
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue # (if applicable)
None
Reason for this change
ELB now supports for reserving minimum LCUs for both Application and Network load balancers.
ALB: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/capacity-unit-reservation.html
NLB: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/capacity-unit-reservation.html
Description of changes
minimumCapacityUnit
toBaseLoadBalancerProps
minimumCapacityUnit
is a positive integerDescription of how you validated changes
Add both unit and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license