4

When "sam deploy" runs it first checks one by one if each asset is in S3 (seems to be a bunch of HEAD requests).

This is a very slow process in one of our projects that has grown to have maybe 30 lambdas and 50 appsync query/mutation VTL files in its assets.

Even if no changes, we see these types of messages scroll by for 6 minutes until deployment starts:

File with same data already exists at xxx/, skipping upload

(it seems to be taking 10-15 sec on some that have ~2 - 5mb of data)

Is this normal? Can't SAM do this in batch operation? It seems to me if it's designed right, it should take seconds to see what needs to be uploaded.

Ben
  • 495
  • 1
  • 7
  • 17
  • https://aws.amazon.com/blogs/compute/accelerating-serverless-development-with-aws-sam-accelerate/ may be helpful – petey Nov 30 '21 at 18:30
  • Nice, that looks promising...I will check it out -- thanks for the tip!! – Ben Nov 30 '21 at 22:14
  • look into converting to cdk v2 (just announced). it can hotswap your lambdas – petey Dec 04 '21 at 14:29
  • raise this issue on the sam github, if people upvote maybe they will improve deployment times. I also have a project with many lambdas and the build/deploy time is slow. – hurlbz Sep 15 '22 at 00:36

0 Answers0