-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: correct recognition of lambda path #12629
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
base: master
Are you sure you want to change the base?
Conversation
All contributors have signed the CLA ✍️ ✅ |
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.
Welcome to LocalStack! Thanks for raising your first Pull Request and landing in your contributions. Our team will reach out with any reviews or feedbacks that we have shortly. We recommend joining our Slack Community and share your PR on the #community channel to share your contributions with us. Please make sure you are following our contributing guidelines and our Code of Conduct.
I have read the CLA Document and I hereby sign the CLA |
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.
Thanks a lot, @thetric for the contribution! I would love to hand over the review for this change to our experts on Lambda to make sure that this change (a) really fixes the issue you see, and (b) ensure that this really is in parity with AWS.
@joe4dev @dfangl @gregfurman could you maybe take over here?
Hi @thetric ! Could you please elaborate what exact issues this solves? Which SDK is affected from this issue? |
I'm trying to create a new Lambda function with the AWS SDK Java v2. The Lambda client is configured to use an IP address (because it's running in our CI via Docker-in-Docker). With the 4.4 release of Localstack, this request fails with an empty HTTP 200 response and the following log:
Searching the Localstack code I found https://github.com/localstack/localstack/blob/master/localstack-core/localstack/aws/protocol/service_router.py#L158. The request parsing only recognises Lambda requests if the path starts with |
Motivation
The AWS Lambda SDK invokes
/2015-03-31/functions
to create a new Lambda function (see https://docs.aws.amazon.com/lambda/latest/api/API_CreateFunction.html) but the handler previously did not recognise it as a Lambda route due to a trailing slash in the path.Changes
Localstack now recognises
/2015-03-31/functions
as a Lambda endpoint