npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

slappforge-lambda-debug-proxy

v1.0.3

Published

The lambda proxy component of SLAppForge AWS Lambda debugger toolkit. This should be installed as a dependency of the lambda function.

Downloads

4

Readme

SLAppForge Debugger for NodeJS - Lambda Proxy

SLAppForge Debugger for NodeJS is a toolkit that can be utilized to perform step-through debugging for the Lambda functions executing on live AWS environment, using your own local IDE.

This is the NPM package that contains the Lambda Proxy component of the toolkit. This should be added as a dependency to the lambda project.

Once added it acts as a wrapper for the actual lambda code by reaching up into the parent and swap the specified lambda handler with its own handler before the lambda code is executed. Then the proxy code takes over and launches the actual handler in as a child process.

Then this Lambda Proxy acts as the intermediary that exchanges V8 protocol messages between the lambda process and the remote broker server.

Prerequisites

As a prerequisite for using this toolkit, you should obtain an access key pair from the SLAppForge Access Key Manager. For that, please visit https://www.slappforge.com/java-debug and login with your SLAppForge Sigma account. If you don't have a Sigma account you can create one for free from here. Once logged in, you can generate an Access Key and an Access Secret.

Using proxy within the Lambda function

After adding this proxy component as a dependency using one of the options, require the package at the very end of the file that contains the Lambda handler that you want to debug.

Also make sure to set a reasonable Timeout value for the Lambda function, so that you have enough time for debugging, before the Lambda function runs out of time.

exports.handler = async (event) => {
    console.log(event);
    return 'Hello World!'; 
};

require('slappforge-lambda-debug-proxy');

Configuring Lambda environment variables

Then the following environment variables must be set for the Lambda function with the appropriate values.

| Name | Required | Description | |------|:--------:| -------------| |SLAPP_DEBUGGER_ACTIVE |:white_check_mark: | This is the flag that indicates whether the Lambda should be invoked in debug mode or not. Setting this to true will enable debugging. |SLAPP_KEY |:white_check_mark: | This is the Access Key obtained from the access key manager |SLAPP_SECRET |:white_check_mark: | This is the Access Secret obtained from the access key manager |SLAPP_SESSION |:white_check_mark: | This is a unique ID to distinguish this Lambda function for debugger to connect. This can be any string value.

In addition to the above, following optional environment variables can be used to provide the Broker Server details.

| Name | Required | Description | |------|:--------:| -------------| |SLAPP_DEBUG_BROKER_HOST |:x: | This is the host name or the IP address of the Broker server. Default value is lambda-debug.slappforge.com |SLAPP_DEBUG_BROKER_PORT |:x: | This is the lambda facing port of the Broker server. Default value is 8181