Skip to content

Conversation

@roger-zhangg
Copy link
Member

@roger-zhangg roger-zhangg commented Sep 19, 2025

Problem

  • Remote Debugging doesn't auto detect sam build dir as outFile before
  • Deployed lambda node in appbuilder is very hidden.

Solution

1. App Builder Resource Node Enhancements (resourceNode.ts)

  • Enhanced icon logic: Deployed Lambda functions now show a different icon (aws-lambda-deployed-function) to indicate deployment status
  • ** Support Remote Actions**: Deployed Lambda functions now directly support "remote invoke" and "fetch log" functionality.

2. Remote Invoke TypeScript Support (invokeLambda.ts)

  • Added outFile property: Stores the TypeScript output directory for debugging
  • Auto-detection of TypeScript build directories: Automatically populates outFile for TypeScript/TSX files when SAM build directory exists
    • Looks for .aws-sam/build/{LogicalID}/ directory structure
    • Enables proper source mapping during debugging
  • Added getOutFile() method: Public accessor for the output file path
  • Improved file watching logic: Disabled automatic file watching when coming from App Builder to prevent unnecessary watchers

Impact

  • Improved Developer Experience: TypeScript developers will benefit from automatic detection of build output directories, making remote debugging setup easier
  • Better App Builder Integration: The new generateLambdaNodeFromResource function enables seamless conversion between App Builder resources and Lambda nodes
  • Enhanced Visual Feedback: Users can now distinguish between deployed and non-deployed Lambda functions in the explorer

Screenshots/Examples

image

When outFiles are not set in CDK/SAM projects with TS debug
For CDK

2025-09-24 17:36:58.567 [info] Starting debugger for arn:aws:lambda:us-west-2:account:function:TriageFn
2025-09-24 17:36:58.685 [info] Creating secure tunnel...
2025-09-24 17:36:58.886 [info] Configuring Lambda function for debugging...
2025-09-24 17:36:58.940 [info] CDK outFile auto-detected from template.json: /Users/user/proj/test/cdk-test/cdk.out/asset.728566f9cc2388f3c89a024fd2e887b4d82715454a0fc478f57d7d034364fdd5
2025-09-24 17:36:58.940 [info] outFile auto-detected: /Users/user/proj/test/cdk-test/cdk.out/asset.728566f9cc2388f3c89a024fd2e887b4d82715454a0fc478f57d7d034364fdd5

For SAM

2025-09-24 17:40:03.597 [info] Creating secure tunnel...
2025-09-24 17:40:03.776 [info] Configuring Lambda function for debugging...
2025-09-24 17:40:03.777 [info] SAM outFile auto-detected: /Users/user/proj/test/test-remote-debug/.aws-sam/build/TestFunction
2025-09-24 17:40:03.777 [info] outFile auto-detected: /Users/user/proj/test/test-remote-debug/.aws-sam/build/TestFunction

  • 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.

@roger-zhangg roger-zhangg requested a review from a team as a code owner September 19, 2025 00:06
@amazon-inspector-ohio
Copy link

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-inspector-ohio
Copy link

✅ I finished the code review, and didn't find any security or code quality issues.

Copy link

@bnusunny bnusunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@laileni-aws
Copy link
Contributor

/retryBuilds

@laileni-aws laileni-aws enabled auto-merge (squash) October 1, 2025 20:42
@laileni-aws laileni-aws merged commit 23a25d1 into aws:master Oct 1, 2025
31 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.

4 participants