Search code examples
pythonamazon-web-servicesaws-lambdaserverless

SAM run without rebuild


I have started to use AWS SAM for python. When testing my functions locally I run:

sam build --use-container
sam local start-api 
You can now browse to the above endpoints to invoke your functions. You do **not** need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatically.
sam local invoke ...

Then, if I make changes to the code it is not reflected without rebuilding when I invoke my function again. Is there any trick that I am missing here? This prompt is not clear to me.


Solution

  • You will have to update your file directly under .aws-sam/build folder to see your changes without rebuilding.