aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Feature request: Deploy Lambdas with concurrency

Open wmonk opened this issue 1 year ago • 3 comments

Describe your idea/feature/enhancement

We have 100s of lambdas. We build outside of SAM using esbuild into single files. When we deploy with SAM it zips up the code, checks the checksum against S3 and then decides whether to update the Lambda or not. This is a pretty slow process for us, and takes ~15m.

Proposal

SAM will zip + checksum + check s3 for each lambda in parallel batches, rather than 1 by 1.

wmonk avatar May 13 '24 16:05 wmonk

Thanks for the suggestion @wmonk

For your use case, do you have same folders that is been used by different lambda functions? In that sense, we should make sure that parallel uploads won't try to upload same folder in different threads.

mndeveci avatar May 15 '24 23:05 mndeveci

@mndeveci I will try to tackle this issue, but I can't promise anything. You've stated:

make sure that parallel uploads won't try to upload the same folder in different threads

Can you explain the reason behind it?

And in general any pointers I can use to better understand how to approach this request?

having-fun-serverless avatar May 29 '24 16:05 having-fun-serverless

Hey @mndevci, sorry for being slow, I missed the notification of your message.

We do a prebuild on our side, so each lambda has it's own directory, there wouldn't be overlap.

wmonk avatar May 29 '24 17:05 wmonk