https://serverless-stack.com/ logo
#sst
Title
# sst
r

Ross Coundon

02/28/2022, 7:39 PM
Does the memory allocation for a lambda have any effect when running locally?
d

Derek Kershner

02/28/2022, 7:56 PM
Guess: No. It might affect the lambda up in AWS, but its just a connection back down to your machine, which will do the grunt work.
r

Ross Coundon

02/28/2022, 7:57 PM
That was my guess too, just wondered if the local runtime did anything with it to more closely approximate the deployed version
f

Frank

02/28/2022, 8:28 PM
Yeah, we used to set
--max-old-space-size
when spawning a node process locally to match the Lambda function’s memory size.
That was taken out at some point. @thdxr does it make sense to add it back?
j

Jay

02/28/2022, 8:36 PM
@Derek Kershner just curious if the thumbs down was that you preferred we didn’t emulate the behavior locally?
d

Derek Kershner

02/28/2022, 8:38 PM
That exactly, although most of my reasoning is that the complexity is likely to cause bugs that are hard to reason and take up more of your guy’s time, in the name of something that is likely a poor approximation anyway. (cc: @Jay) It doesn’t actually affect our workflow.
j

Jay

02/28/2022, 8:41 PM
Yeah it won’t be perfect. @Ross Coundon curious why you were looking into this.
r

Ross Coundon

02/28/2022, 8:43 PM
It was just curiosity really. I was running into some memory issues and it got me thinking. I think Derek’s probably right, it’s unnecessary complication