Skip to content

Commit cb09b95

Browse files
authored
add LOCAL_LAMBDA_SERVER_INVOCATION_ENDPOINT to the readme (#326)
1 parent 294d06b commit cb09b95

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

readme.md

+11
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,17 @@ curl -v --header "Content-Type:\ application/json" --data @events/create-session
205205
* Connection #0 to host 127.0.0.1 left intact
206206
{"statusCode":200,"isBase64Encoded":false,"body":"...","headers":{"Access-Control-Allow-Origin":"*","Content-Type":"application\/json; charset=utf-8","Access-Control-Allow-Headers":"*"}}
207207
```
208+
### Modifying the local endpoint
209+
210+
By default, when using the local Lambda server, it listens on the `/invoke` endpoint.
211+
212+
Some testing tools, such as the [AWS Lambda runtime interface emulator](https://docs.aws.amazon.com/lambda/latest/dg/images-test.html), require a different endpoint. In that case, you can use the `LOCAL_LAMBDA_SERVER_INVOCATION_ENDPOINT` environment variable to force the runtime to listen on a different endpoint.
213+
214+
Example:
215+
216+
```sh
217+
LOCAL_LAMBDA_SERVER_ENABLED=true LOCAL_LAMBDA_SERVER_INVOCATION_ENDPOINT=/2015-03-31/functions/function/invocations swift run
218+
```
208219

209220
## Increase logging verbosity
210221

0 commit comments

Comments
 (0)