-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: proxy requests back through tunnel to originate from lambda execution environment #68
Comments
That is a brilliant idea. 💡 I am not sure how hard it would be to implement that. For HTTP traffic, it would probably be easier, but for TCP (like SQL database connection), it could be a bit challenging. I will explore it further. |
I found quite some npm libraries that can intercept either HTTP or TCP requests or both: Using them would probably not be that hard to implement the functionality. The Lambda handler runs in a Node Worket Thread, so it is isolated, and any HTTP/TCP interception would probably not cause other issues on the Lambda Live Debugger. |
|
I played with this for some time and think it's doable. The TCP also intercepts HTTP connections, so there would be one solution for both. I see the most value when using SQL database or Redis in VPC. Resolving issues with any other connection within VPC or using the Lambda Secrets Extension would also be very valuable. |
@rogerchi That works for a simple scenario. But it does not if you use real-case scenarios like connecting to an SQL database. SQL clients have complicated connection pooling. I do not think it is possible to do this without patching the SQL client library. That would, of course, require a lot of work. The TCP traffic is the most interesting because you can connect to the SQL database. HTTP does not seem that useful, except for Lambda Secrets Extension. I will not be proceeding with this, at least for now. |
I wonder if it would be possible to proxy requests originating from the local debug environment back through the IOT tunnel and originate them from the lambda execution environment? A few different use cases we have for this:
reference: https://www.frodehus.dev/debugging-web-requests-using-mitmproxy-wsl-and-vscode/
The text was updated successfully, but these errors were encountered: