aws / aws/aws-toolkit-vscode

Remote Lambda Debugging Fails with “/opt/bin/ldk_wrapper: line 7: cat: command not found” on Node.js 22

Open
#7,716 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

## Problem

When attempting to debug a remote Lambda function using the new *Remote Lambda Debugging* feature in the AWS Toolkit for VS Code, I encounter the following error:

```

2025-07-19 13:54:20.623 \[info] Logs:
2025-07-19 13:54:20.623 \[info] INFO Running in debug mode - remote debugging enabled
/opt/bin/ldk\_wrapper: line 7: cat: command not found
Local proxy not ready or failed to start. Debugging will not be enabled.
EXTENSION Name: ldk\_lambda\_extension State: Ready Events: \[]

```

This occurs consistently when debugging a Lambda function running on **Node.js 22.x**, tested in both `ap-northeast-2` and `us-east-1` regions.

## Steps to reproduce the issue

1. Deploy a Lambda function using Node.js 22 runtime.
2. Open the Lambda in Visual Studio Code using the toolkit
3. Use the new *Remote Lambda Debugging* feature from the AWS Toolkit.
4. Observe the logs after initiating the debug session.

## Expected behavior

The remote Lambda debugging session should start successfully, allowing breakpoints to be hit and code inspection to proceed.

## System details

- OS: Windows 11
- Visual Studio Code version: 1.102.0
- AWS Toolkit version: 3.69.0
- Amazon Q version: N/A (not in use)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing Remote Lambda Debugging for a Node.js 22.x function and inspect the logged /opt/bin/ldk_wrapper failure. Trace why cat is unavailable in the remote environment and verify completion when the local proxy starts, debugging is enabled, and breakpoints can be hit.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, nodejs, typescript, vscode
Domain
backend, cloud, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.