@@ -50,7 +50,7 @@ custom:
50
50
- my_custom_network
51
51
lambda:
52
52
# Enable this flag to improve performance
53
- mountCode: True
53
+ mountCode: true # specify either "true", or a relative path to the root Lambda mount path
54
54
docker:
55
55
# Enable this flag to run "docker ..." commands as sudo
56
56
sudo: False
@@ -67,10 +67,13 @@ Note the `stages` attribute in the config above. The `serverless-localstack` plu
67
67
68
68
### Mounting Lambda code for better performance
69
69
70
- Note that the ` localstack.lambda.mountCode ` flag above will mount the local directory
71
- into the Docker container that runs the Lambda code in LocalStack. If you remove this
72
- flag, your Lambda code is deployed in the traditional way which is more in line with
73
- how things work in AWS, but also comes with a performance penalty: packaging the code,
70
+ Note that the ` localstack.lambda.mountCode ` flag above will mount the local directory into
71
+ the Docker container that runs the Lambda code in LocalStack. You can either specify the boolean
72
+ value ` true ` (to mount the project root folder), or a relative path to the root Lambda mount path
73
+ within your project (e.g., ` ./functions ` ).
74
+
75
+ If you remove this flag, your Lambda code is deployed in the traditional way which is more in
76
+ line with how things work in AWS, but also comes with a performance penalty: packaging the code,
74
77
uploading it to the local S3 service, downloading it in the local Lambda API, extracting
75
78
it, and finally copying/mounting it into a Docker container to run the Lambda. Mounting code
76
79
from multiple projects is not supported with simple configuration, and you must use the
@@ -195,6 +198,7 @@ custom:
195
198
196
199
## Change Log
197
200
201
+ * v1.0.0: Allow specifying path for mountCode, to point to a relative Lambda mount path
198
202
* v0.4.36: Add patch to avoid "TypeError" in AwsDeploy plugin on Serverless v3.4.0+
199
203
* v0.4.35: Add config option to connect to additional Docker networks
200
204
* v0.4.33: Fix parsing StepFunctions endpoint if the endpointInfo isn't defined
0 commit comments