aws / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
6.5k stars 1.17k forks source link

Feature request: Deploy Lambdas with concurrency #7056

Open wmonk opened 4 months ago

wmonk commented 4 months ago

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.

mndeveci commented 4 months ago

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.

having-fun-serverless commented 4 months ago

@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?

wmonk commented 4 months ago

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.