question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hot reloading for Python Lambda functions

See original GitHub issue

The python with packages example demonstrates using sam local with a bundle.zip. Hot-reloading still “works” in that if the bundle.zip changes it will reload the contents, but there’s still a lengthy build time for each change.

If I simply delete the bundle.zip hot reload of the python files appears to work. I haven’t tracked down why, but I assume it has to do with the default value from --static-dir pointing at where my functions live.

I’d be satisfied with putting logic into the template like CodeUri: !If [EnvRunningLocal, ., bundle.zip], but #194 documents how that’s failing for me. I can imagine other ways to solve this, but I know very little about this project so I’m hesitant to ask for specific implementations. I’d just like to have some way of having hot reload work on python files even when the final target is a zip.

#featurerequest

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sanathkrcommented, May 31, 2018

#435 started an excellent discussion/PR around this feature

0reactions
sriram-mvcommented, Oct 5, 2020

@tedbrandston Is this the same case as of today? Are you running into similar issues today. I’m going to close this issue for now, but feel free to open a new issue with latest steps to reproduce this.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hot reloading for Python Lambda functions · Issue #195 - GitHub
The python with packages example demonstrates using sam local with a bundle.zip. Hot-reloading still "works" in that if the bundle.zip ...
Read more >
Hot Swapping - LocalStack Docs
Hot code swapping for Lambda functions using LocalStack's code mounting.
Read more >
Redirecting AWS Lambda invocations to local for Debugging ...
Hot reloading and live debugging are techniques that can significantly improve the productivity of developers working on serverless applications ...
Read more >
I made a local development, debugging and hotreload tool for ...
MerLoc is a live AWS Lambda function development and debugging tool. ... your IDE - hot-reload updated function on your local automatically to...
Read more >
How to reload a module's function in Python? - Stack Overflow
As of today, the proper way of doing this is: import sys, importlib importlib.reload(sys.modules['foo']) from foo import bar.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found