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.
According to https://github.com/aws/aws-sam-cli/issues/920 & https://github.com/aws/aws-sam-cli/issues/901, you are expected to have two consoles/terminals open. One where you run sam local start-api
and leave it alone. And another where you run sam build
repeatedly (whenever you need to update).
If you find this > slightly annoying,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With