Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 20 additions & 1 deletion content/en/user-guide/lambda-tools/hot-reloading/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
title: "Hot Reloading"
date: 2021-09-27
weight: 1
description: >
Hot code reloading continuously applies code changes to Lambda functions
aliases:
- /user-guide/tools/lambda-tools/hot-reloading/
---

## Introduction

Hot reloading (formerly known as hot swapping) continuously applies code changes to Lambda functions without manual redeployment.

Quickly iterating over Lambda function code can be quite cumbersome, as you need to deploy your function on every change.
Expand Down Expand Up @@ -675,6 +676,24 @@ With the above example, you can make hot-reloading paths sharable between machin
One example for this are checked out git repositories, where the code is located in the same structure - the absolute location of the checked out repository on the machine might however differ.
If the chosen variable always points to the checked out directory, you can set the path using the placeholder in the checked out IaC template, or can share a Cloud Pod between machines.

## Hot Reloading on LocalStack Web Application

You can use the LocalStack Web Application to hot reload your Lambda functions.
The [Lambda Resource Browser](https://app.localstack.cloud/inst/default/resources/lambda/functions) allows you to update your Lambda function and specify the file path for your Lambda code and dependencies.

To set up Lambda Hot Reloading via the LocalStack Web Application:

1. Navigate to the [Lambda Resource Browser](https://app.localstack.cloud/inst/default/resources/lambda/functions).
2. Click **Create** to create a new Lambda function, or select **Update Function Code** for an existing Lambda function.
3. In the **Code Source** section, choose **Hot Reload**.
4. Enter the path to the directory containing your Lambda code for hot reloading.
5. Click **Submit** to save the configuration.

LocalStack will automatically set up the magic S3 bucket and the S3 key pointing to your specified file path.
Changes to your Lambda code locally will be reflected immediately upon saving.

<img src="hot-reload-lambda-web-app.png" alt="Setting Hot Reload on Web App" title="Setting Hot Reload on Web App" width="800px" />

## Useful Links

* [Lambda Code Mounting and Debugging (Python)](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-mounting-and-debugging)
Expand Down