You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, when using the local Lambda server, it listens on the `/invoke` endpoint.
469
+
By default, when using the local Lambda server during your tests, it listens on `http://127.0.0.1:7000/invoke`.
470
470
471
-
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.
471
+
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, the port might be used, or you may want to bind a specific IP address.
472
472
473
-
Example:
474
-
475
-
```sh
476
-
LOCAL_LAMBDA_SERVER_INVOCATION_ENDPOINT=/2015-03-31/functions/function/invocations swift run
477
-
```
478
-
479
-
## Modifying the local port
480
-
481
-
By default, when using the local Lambda server, it listens on TCP port 7000.
473
+
In these cases, you can use three environment variables to control the local server:
482
474
483
-
On macOS, this port might be used by AirPlay under some configurations. You can use the `LOCAL_LAMBDA_PORT` environment variable to configure the runtime to listen on a different TCP port.
475
+
- Set `LOCAL_LAMBDA_HOST` to configure the local server to listen on a different TCP address.
476
+
- Set `LOCAL_LAMBDA_PORT` to configure the local server to listen on a different TCP port.
477
+
- Set `LOCAL_LAMBDA_INVOCATION_ENDPOINT` to force the local server to listen on a different endpoint.
484
478
485
479
Example:
486
480
487
481
```sh
488
-
LOCAL_LAMBDA_PORT=7777 swift run
482
+
LOCAL_LAMBDA_PORT=8080 LOCAL_LAMBDA_INVOCATION_ENDPOINT=/2015-03-31/functions/function/invocations swift run
0 commit comments