Skip to main content

AWS Lambda

AWS Lambda is an event-driven, serverless computing platform that runs code in response to events. You can run code without having to manage the server. You can use it to run code of any type of application or backend service.

Prerequisite

  1. AWS Account: You need an active AWS account with appropriate permissions to create and manage Lambda functions.

  2. Lambda Function: Create the Lambda function in your AWS account that you intend to integrate with the connector. Ensure you have the function's ARN (Amazon Resource Name) available.

  3. Access and Secret Keys: Obtain the AWS Access Key ID and Secret Access Key associated with the IAM user or role that has access to the Lambda function. These credentials will be used for authentication during connector configuration.

  4. Connector Configuration Details: Prepare the necessary information required for connector configuration, such as AWS region, and the appropriate access and secret keys.

Configuring API Connector in DronaHQ

Add a Account name. Then add the necessary details such as Access and Secret key and AWS region for the connector account. Once all details are added, click Save. Your connector configuration is now done.

AWS Lambda with configuration details.
AWS Lambda with configuration details.

After successfully configuring and saving the connector settings, you can easily access your newly connected account by navigating to the connected accounts list. You can find this option from the Connector -> Manage Account section. This centralized location allows you to conveniently monitor and manage your connected accounts.

Supported API endpoints

ActionDescription
GetFunctionDetailsRetrieve detailed information about a specific Lambda function using its ARN.
InvokeFunctionTrigger the execution of a Lambda function and retrieve its response.
ListFunctionsGet a list of Lambda functions available in your AWS account.

Using AWS Lambda Connector

Retrieving a List of Functions

  1. Integrate essential interface components in your application, such as buttons or input fields, to initiate actions associated with AWS Lambda.

  2. Navigate to Bind Data Option -> Quick Select -> Connector Library.

  3. Select the appropriate endpoint according to your needs, like GetFunctionDetails, InvokeFunction, or ListFunctions. Ensure you choose the relevant environment.

  4. Set up any necessary parameters or inputs for the chosen endpoint. For instance, if using ListFunctions, you may need to define an AWS Lambda account for authentication.

  5. Execute a Refresh Response to populate response fields with data retrieved from the connector.

  6. Establish connections between the response fields and corresponding controls in your application's interface, enabling the display of fetched information.

  7. Click on Test & Finish to conclude the configuration of the connector.

Binding Connector Data
Utilizing AWS Lambda connector

Invoking functions

The AWS Lambda connector enables you to effectively invoke your customized functions. Let us take an example here to invoke the selected function on the click of the action button. You also have the option to the Invocation type as Request Response, Dry Run, or Event.

  • RequestResponse invokes the function synchronously and receives an API response.
  • Event type invokes function asynchronously.
  • DryRun is used to validate parameter values and verify that the user has permission to invoke the function.
  1. On the button_click event of the action button, you would add the Server-side action > AWS Lambda connector and choose the action InvokeFunction.

  2. Select the connected account and click Continue.

  3. Use the dropdown control as the Function list from the Use keywords, add the Invocation type (which is / can be optional) and provide the Invocation type using the Dropdown control’s name from the Use keywords. Click Continue.

Binding Connector Data
  1. Add the action name and provide the variable that returns the response code for the action completed. If you want you can use this variable to display the URL in a text area control for the sake of understanding.
  1. Now, you can see the function invocation and the response status code whenever you run the form.
Binding Connector Data