| Key | Value |
|---|---|
| Services | ELB, Lambda |
| Integrations | Serverless Framework |
| Categories | Networking; Serverless |
A demo application illustrating ELBv2 Application Load Balancers using LocalStack, deployed via the Serverless framework. The sample deploys Lambda functions behind an Application Load Balancer and demonstrates HTTP invocations through the ELB endpoints.
- A valid LocalStack for AWS license. Your license provides a
LOCALSTACK_AUTH_TOKENto activate LocalStack. - Docker
localstackCLI- Node.js with
npm - Serverless Framework
make checkmake installexport LOCALSTACK_AUTH_TOKEN=<your-auth-token>
make startmake runThe script deploys the Serverless application and invokes the Lambda functions via ELB endpoints /hello1 and /hello2.
You should see output similar to:
> sls deploy --stage local
...
Serverless app successfully deployed. Now trying to invoke the Lambda functions via ELB endpoint.
...
Invoking endpoint 1: http://lb-test-1.elb.localhost.localstack.cloud:4566/hello1
"Hello 1"
Invoking endpoint 2: http://lb-test-1.elb.localhost.localstack.cloud:4566/hello2
"Hello 2"This code is available under the Apache 2.0 license.