ask-cli deploy lambda takes long time

173 Views Asked by At

Whenever I try to run ask deploy lambda for the python lambda, it first attach and zip all the libraries and then updates the lambda scripts, which takes a long time. Is there any way to limit it to only updating the .py files that changed?

Thanks,

1

There are 1 best solutions below

1
On

as far as I know there is no "changeset" concept from Lambda service to only provide the changed part of the code. Hence ask-cli might be able to do that.

CLI can deploy smartly when it's related to the changes in AWS service using cloudformation, like it only deploys changes for the modified service. With this idea, CLI does support localHash comparison to avoid unnecessary deployments, if there is no change to your code at all locally. However, it has to be the entire source code plus its build for Lambda code uploading. This means as long as you change the code, the re-build time and the upload time are kinda a must have.

Btw, how long usually do you need to wait for this code upload process?