Connect a Lambda resource

Learn how to connect AWS Lambda to Retool.

Making a new Lambda IAM user

Head over to IAM, make a new user, and call it retool-lambda-invoker. Only enable "programmatic access".

Creating an IAM user and setting the access type.

Hit "next" to grant the account permissions.You'll need to grant 2 specific permission types: ListFunctions and Invoke.

Configuring Permissions

Click Attach existing policies directly. If you already have a the correct Lambda permissions policy set up, you can search for it and select it here; however, it's likely that you'll have to create a new policy. If so, click on the Create Policy button.

In the policy editor, make the following selections:

Under Service search for and select Lambda.
Under Access level > List select ListFunctions.
Under Access level > Write select InvokeFunction.
Under Resources select All resources.
Click Review Policy.

Create the Lambda policy.

Create a Name for your policy (you can call it something like "LambdaInvoker") and click Create Policy.

Creating the IAM User

Back in the "Add user" screen, search for and select the Lambda permissions policy you just created, or just select your pre-existing policy if you skipped the creation step above.

Select the Lambda permissions policy.

Click Next (you can skip adding Tags) and then Create User.

Your Lambda user has been created!

Success page indicating your Lambda user has been created.

Connecting to Retool

In the resources selector view - choose "Lambda." You will be prompted to provide an Access Key ID and Secret Access Key ID, as well as specify your AWS Region. You can find out how to obtain these in the Lambda Docs.

Enter your Lambda credentials in Retool.

You can then specify the Lambda function you want to call from the dropdown, and add a payload:

Calling a Lambda function from the Retool editor.