feat: add standalone Alb component for shared load balancers#6395
Open
ekaya97 wants to merge 1 commit intoanomalyco:devfrom
Open
feat: add standalone Alb component for shared load balancers#6395ekaya97 wants to merge 1 commit intoanomalyco:devfrom
ekaya97 wants to merge 1 commit intoanomalyco:devfrom
Conversation
Add a standalone `Alb` component that can be shared across multiple `Service` instances. Services can attach to a shared ALB using path-based routing rules with explicit priorities. - Add `Alb` component with HTTP/HTTPS listeners, SSL/TLS support, and DNS integration - Add `loadBalancer.instance` option to Service for attaching to external ALBs - Add `loadBalancer.rules` for path/header/query condition-based routing - Add `Alb.get()` reference pattern with lazy listener discovery - Add unit tests for Alb (10 tests) and Service+ALB integration (9 tests) - Add examples: aws-shared-alb (HTTP) and aws-shared-alb-domain (HTTPS with custom domain) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
|
this is super nice @ekaya97 excited to be able to do router.route( |
Contributor
Author
|
Thanks! Check out my other PR #6379 - similar kind of extension concerning WAF in Router. |
|
This is so valuable I've monkey patched my existing sst deployment to deploy in production. It'll be great to see this merged. Thanks for your effort. 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a standalone
Albcomponent that can be shared across multipleServiceinstances. This allows multiple ECS services to share a single Application Load Balancer with path-based routing.Fixes #6017 #5510
New API
Features
loadBalancer.instanceoption for attaching to external ALBsAlb.get(name, arn)with lazy listener discovery for cross-stack referencesLink.Linkable, exposesurlfor SST linkingFiles Changed
platform/src/components/aws/alb.tsplatform/src/components/aws/service.tsloadBalancerprop, ALB attachment logicplatform/src/components/aws/index.tsAlbplatform/package.json@types/nodedevDependencyplatform/vitest.config.ts@types/noderesolution)platform/test/components/alb.test.tsplatform/test/components/service-alb.test.tsexamples/aws-shared-alb/examples/aws-shared-alb-domain/Test plan
aws-shared-albexample to AWS — 7/7 tests passaws-shared-alb-domainexample to AWS — 9/9 tests pass (SSL, HTTP→HTTPS redirect)HTTP Example Test Results
HTTPS Example Test Results
🤖 Generated with Claude Code