Skip to content
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

Feature Request - Support for Application Load Balancer #214

Closed
vijaychd opened this issue Dec 3, 2018 · 10 comments
Closed

Feature Request - Support for Application Load Balancer #214

vijaychd opened this issue Dec 3, 2018 · 10 comments
Assignees
Milestone

Comments

@vijaychd
Copy link

vijaychd commented Dec 3, 2018

  • Framework version: XX
  • Implementations: Jersey / Spring / Spring Boot / Spark
    Spring boot

Scenario

Calling Lambda Function thru Application Load Balancer

Expected behavior

Application load balancer is recently added as trigger for lambda function. it would be nice to support that for java container in lambda.

Actual behavior

Steps to reproduce

Full log output

@vijaychd vijaychd changed the title Feature Request Feature Request - Support for Application Load Balancer Dec 3, 2018
@sapessi
Copy link
Collaborator

sapessi commented Dec 3, 2018

Thanks for the feedback @vijaychd - we'll definitely look at this for the next release

@sapessi sapessi self-assigned this Dec 3, 2018
@sapessi sapessi added this to the Release 1.3 milestone Dec 3, 2018
@sapessi
Copy link
Collaborator

sapessi commented Dec 20, 2018

@vijaychd I have committed ALB support in the 1.3-SNAPSHOT version in the core branch of this repository. Could you run a few tests with it? Please note that it only supports the multi-value headers feature

@vijaychd
Copy link
Author

Thanks @sapessi
Initial test looks good to invoke the rest controller. I added /lambda-demo-api/rs/* to the controller and configured ALB for /lambda-demo-api/*. Call to api methods worked. .

@vijaychd
Copy link
Author

need to figure out how /health and /swagger-ui.html would work. @sapessi Can that be supported?

@sapessi
Copy link
Collaborator

sapessi commented Dec 21, 2018

Technically it should work @vijaychd, although I have never tried. What framework are you testing with?

@vijaychd
Copy link
Author

Spring boot. /health worked after i changed the endpoint. /v2/api-docs doesn't.

@sapessi
Copy link
Collaborator

sapessi commented Dec 21, 2018

Any chance you have a github repo I can use to try and replicate quickly?

@vijaychd
Copy link
Author

Nope.
For spring boot app, usually the context path is set as
server.servlet.context-path=/lambda-demo-api

I think with ApiGateway proxy it was always getting set as /. Is it something you can add to override the context path for container.

So i will use same context on the ALB, then all endpoints should work

sapessi added a commit that referenced this issue Dec 26, 2018
…hat the behavior between ALB and API Gateway differs: ALB does not decode encoded query parameters, API Gateway does.
@sapessi
Copy link
Collaborator

sapessi commented Dec 26, 2018

Resolving in preparation for 1.3 release

@vijaychd
Copy link
Author

By setting below, /health and /v2/api-docs worked fine.
handler = SpringBootLambdaContainerHandler.getAwsProxyHandler(Application.class, profiles);
handler.getContainerConfig().setServiceBasePath("/lambda-demo-api");
handler.getContainerConfig().setStripBasePath(true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants