1
votes

Currently, building AWS SAM is really slow.

sam build --use-container

that prevent me from testing out small changes on code and not on the dependencies.

Is there away that sam build will only copy the source and do not perform any kind of clean/reinstall of dependencies?

2

2 Answers

1
votes

One of the solution supported by AWS could be using of Dependencies Layer with detail to be found here.

0
votes

I assume you already know about the --skip-pull-image option that allows you to avoid pulling the container image on rebuild.

Otherwise, looking in the source code and the documentation, there does not appear to be any support for not rebuilding the dependencies.

Note that in the DESIGN.md is suggested how a user could perhaps write their own "plugin" to implement a different "workflow":

... each language-specific piece acts almost like a plugin, its its own self contained directory. Someone could develop their own "package" with the structure

This could help to find a workaround.