Skip to content

feat(elasticloadbalancingv2): minimum Loadbalancer Capacity Unit (LCU) reservation#32382

Merged
mergify[bot] merged 29 commits intoaws:mainfrom
badmintoncryer:elb-minimum-capacity
Feb 11, 2025
Merged

feat(elasticloadbalancingv2): minimum Loadbalancer Capacity Unit (LCU) reservation#32382
mergify[bot] merged 29 commits intoaws:mainfrom
badmintoncryer:elb-minimum-capacity

Conversation

@badmintoncryer
Copy link
Copy Markdown
Contributor

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

  • Add minimumCapacityUnit to BaseLoadBalancerProps
  • Verify whether minimumCapacityUnit is a positive integer

Description 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

@github-actions github-actions Bot added the p2 label Dec 4, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team December 4, 2024 12:28
@github-actions github-actions Bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Dec 4, 2024
@badmintoncryer
Copy link
Copy Markdown
Contributor Author

badmintoncryer commented Dec 4, 2024

I've requested for reserved minimum LCU quotas to execute integ test.

Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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
Copy link
Copy Markdown

codecov Bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.92%. Comparing base (7175a04) to head (7853154).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32382   +/-   ##
=======================================
  Coverage   80.92%   80.92%           
=======================================
  Files         236      236           
  Lines       14256    14256           
  Branches     2491     2491           
=======================================
  Hits        11537    11537           
  Misses       2434     2434           
  Partials      285      285           
Flag Coverage Δ
suite.unit 80.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 79.74% <ø> (ø)
packages/aws-cdk-lib/core 82.20% <ø> (ø)

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

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.

@aws-cdk-automation aws-cdk-automation dismissed their stale review December 27, 2024 00:55

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

if (
minimumCapacityUnit &&
!Token.isUnresolved(minimumCapacityUnit) &&
(minimumCapacityUnit < 100 || minimumCapacityUnit > 1500)
Copy link
Copy Markdown
Contributor Author

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) {
Copy link
Copy Markdown
Contributor Author

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)

@badmintoncryer badmintoncryer marked this pull request as ready for review January 29, 2025 13:26
@aws-cdk-automation aws-cdk-automation dismissed stale reviews from themself February 7, 2025 13:22

Dismissing outdated PRLinter review.

@aws-cdk-automation aws-cdk-automation dismissed their stale review February 10, 2025 07:24

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@badmintoncryer
Copy link
Copy Markdown
Contributor Author

@aaythapa Thank you for your review! I've addressed all of your comments.

aaythapa
aaythapa previously approved these changes Feb 10, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 10, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aaythapa
Copy link
Copy Markdown
Contributor

Thank you as always for contributing! Everything LGTM

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 10, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 10, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 10, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@aaythapa
Copy link
Copy Markdown
Contributor

@mergify requeue

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 10, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 10, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@aaythapa
Copy link
Copy Markdown
Contributor

@mergify update

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 10, 2025

update

❌ Mergify doesn't have permission to update

Details

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/sync-from-upstream.yml without workflows permission

@aaythapa
Copy link
Copy Markdown
Contributor

@mergify requeue

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 10, 2025

requeue

❌ This pull request head commit has not been previously disembarked from queue.

@mergify mergify Bot dismissed aaythapa’s stale review February 10, 2025 22:51

Pull request has been modified.

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 10, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7853154
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify Bot merged commit 9b178c1 into aws:main Feb 11, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 11, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@github-actions
Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 11, 2025
@badmintoncryer badmintoncryer deleted the elb-minimum-capacity branch February 11, 2025 04:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants