forked from aws/aws-lambda-runtime-interface-emulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The API endpoint in Amazon's implementation of Lambda used the path `/2015-03-31/functions/[func]/invocations` to invoke the function. `[func]` the name of the function and is set as the value of the `AWS_LAMBDA_FUNCTION_NAME` environment variable when the function is executing on AWS. The emulator uses a hard coded endpoint of `/2015-03-31/functions/function/invocations`. This is even the case when the `AWS_LAMBDA_FUNCTION_NAME` environment variable is set to another value. This patch changes the endpoint URL when the `AWS_LAMBDA_FUNCTION_NAME` environment variable is set. In this case the invocation URL will be `/2015-03-31/functions/${AWS_LAMBDA_FUNCTION_NAME}/invocations`. When the environment variable isn't set, the current behaviour persists and the function name is set to `function`. The end result is the emulator behaviour is closer to the real environment the functions execute in. This PR fixes aws#43 I raised a few weeks ago.
- Loading branch information
Showing
3 changed files
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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