Skip to content

Conversation

@roger-zhangg
Copy link
Member

@roger-zhangg roger-zhangg commented Jul 16, 2025

Problem

  • Enhanced Developer Experience - Current Remote Lambda debugging options are limited, primarily relying on print statements. LDK will significantly improve the developer experience by allowing real-time inspection of variables and execution flow.
  • Authentic Environment Debugging - Customers are eager to debug in the actual Lambda environment. However, Lambda doesn't allow direct SSH connections from external sources, making it challenging to access the runtime for debugging purposes.
  • Advantages over Local Debugging - While local debugging is a common alternative, Remote debugging offers significant benefits: Access to resources within VPCs, Ability to follow specific IAM rules and permissions which are typically not possible in a local debugging solution.
  • Efficient Problem Resolution - Debugging in the real Lambda environment provides the shortest path to identifying and resolving issues, as it eliminates
    discrepancies between local and real Lambda environments.

Solution

Remote debugging (LDK) enable developers to remote debug live Lambda functions from AWS Toolkit for Visual Studio Code. LDK creates a secure tunnel between a developer’s local computer and a live Lambda function running in the cloud. With LDK, developers can use Visual Studio Code debugger to debug a running Lambda function, set break points, inspect variables, and step through the code.

File structure

  • ldkClient.ts
    • Implement API calls to IoT & Lambda
  • localproxy.ts
  • Implement the local proxy to connect to the IoT SecureTunneling(ST) websocket and create a proxy tcp server
  • ldkController.ts
    • Control the debug workflow

UI update

image

Arch

image ### Sequence Diagram

image


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

…ws#2125)

## Problem
* Enhanced Developer Experience - Current Remote Lambda debugging
options are limited, primarily relying on print statements. LDK will
significantly improve the developer experience by allowing real-time
inspection of variables and execution flow.
* Authentic Environment Debugging - Customers are eager to debug in the
actual Lambda environment. However, Lambda doesn't allow direct SSH
connections from external sources, making it challenging to access the
runtime for debugging purposes.
* Advantages over Local Debugging - While local debugging is a common
alternative, Remote debugging offers significant benefits: Access to
resources within VPCs, Ability to follow specific IAM rules and
permissions which are typically not possible in a local debugging
solution.
* Efficient Problem Resolution - Debugging in the real Lambda
environment provides the shortest path to identifying and resolving
issues, as it eliminates
[discrepancies](aws/aws-lambda-base-images#112)
between local and real Lambda environments.

## Solution
Remote debugging (LDK) enable developers to remote debug live Lambda
functions from AWS Toolkit for Visual Studio Code. LDK creates a secure
tunnel between a developer’s local computer and a live Lambda function
running in the cloud. With LDK, developers can use Visual Studio Code
debugger to debug a running Lambda function, set break points, inspect
variables, and step through the code.

### File structure
- ldkClient.ts
  - Implement API calls to IoT & Lambda
- localproxy.ts
- Implement the local proxy to connect to the IoT SecureTunneling(ST)
websocket and create a proxy tcp server
- ldkController.ts
  - Control the debug workflow
- The Lambda Layer this tool depends on is implemented in another repo
  - https://github.com/aws-samples/aws-lambda-debugging-kit

###  UI update

![image](https://github.com/user-attachments/assets/e526a46d-952c-45c5-aca6-77353d46ca7a)



### Arch

![image](https://github.com/user-attachments/assets/aaf90b74-3060-44b7-bde6-383e15b04910)
### Sequence Diagram

![image](https://github.com/user-attachments/assets/866b61dc-3872-41b0-a140-7b35d0c2a8be)


---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
@roger-zhangg roger-zhangg requested a review from a team as a code owner July 16, 2025 01:15
@yueny2020 yueny2020 enabled auto-merge (squash) July 16, 2025 03:53
@yueny2020 yueny2020 disabled auto-merge July 16, 2025 03:54
@yueny2020 yueny2020 merged commit 8cd876d into aws:master Jul 16, 2025
22 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants