Skip to main content

Getting Started

Let's start by getting a quick lambda function up and running.

Pre-requisites

If you haven't already, download LocalStack and ensure Docker is also installed.

Creating your first Lambda

We will create a NodeJS Lambda function and enable Hot Reloading for instant updates.

1. Creating the handler file.

Copy the following code into a index.js file.

index.js
exports.handler = async (_event) => {
console.log(_event);
return 'hello world!';
}

2. Setting up the lambda for Hot Reloading.

Add the lambda in Shade by going to Functions then Add in the sidebar.

Note the handler is index.handler which is a combination of the file name and the exported function name. See more information here

HelloWorldForm

3. Invoke the function

Head over to the invocations tab of the newly created lambda and invoke!. You should see "hello world!" now printed inside the output box.

HelloWorldInvoke