AWS Lambda Connector 1.0.0.0

The AWS Lambda Connector lets you invoke AWS Lambda functions synchronously or asynchronously,

Prerequisites

Contents

Object Type Name Description
Folder GLOBAL.Redwood.REDWOOD.AWS.REDWOOD.Lambda Integration Connector with AWS Lambda (1.0.0.0)
Constraint Definition REDWOOD.Redwood_AWS_LambdaConstraint Constraint for AWS Lambda function in the specified region
Job Definition REDWOOD.Redwood_AWS_Lambda_InvokeFunction_Template Template for Invoke AWS Lambda Function
Job Definition Type REDWOOD.Redwood_AWS_Lambda AWS Lambda Definition Type
Library REDWOOD.Redwood_AWS_Lambda Library for AWS Lambda Connector

Setup

To install the AWS Lambda Connector, click its tile in the Catalog, select the version you want, and then click Install <version number>.

Job Definitions

Redwood_AWS_Lambda_InvokeFunction_Template

Template for invoking AWS Lambda functions.

Parameters

Tab Name Description Documentation Data Type Direction Default Expression Values
Parameters connection AWS Lambda Connection The AWS Connection to use for invoking the Lambda function. String In

 

 

Parameters regionName Region The name of the Region that the AWS Lambda is located in. String In

 

 

Parameters functionName Function Name Name of the Lambda function to invoke. String In

 

 

Parameters waitForCompletion Wait for Completion

If you enter No, the Lambda function will be invoked asynchronously and the Job will finish immediately. If you enter Yes, the Lambda function will be invoked synchronously and the Job will remain running until the Lambda function completes.

Note: If you set this field to No (asynchronous execution), any clientContext information you supply in the Source field will be ignored.

Note: If you set this field to Yes (synchronous execution), the last 4KB of the Lambda log is written to the stdout.log file.

String In No Yes, No
Parameters requestId Request Id The ID of the invocation request. String Out

 

 

Parameters response Response Output Link to the generated response.json file that contains the output of the Job. String Out

 

 

Procedures

Triggering a Lambda Function with a Template

To create a customized Job Definition, optionally with default values, for triggering a Lambda function:

  1. Right-click the Redwood_AWS_Lambda_InvokeFunction_Template Job Definition and choose New (from Template) from the context menu. The New Job Definition tab displays.

  2. Choose a Partition.

  3. Enter a Name.

  4. Delete the default Folder value (if any) and substitute your own Folder name if desired.

  5. In the Source field, the default content is this:

    Copy
    {
        "clientContext": {},
        "payload": {
        }
    }

    You can use this JSON to pass Parameter values to AWS Lambda. For example, if you create Parameters for the values your AWS Lambda requires, you can then set the Source field to something like this:

    Copy
    {
     "clientContext": {
        "client": {
           "app_package_name": "${appPackageName}",
           "app_title": "${myApp}",
           "app_version_code": "${app_version_code}",
           "app_version_name": "${app_version_name}"
      },
         "env": {
           "platform": "${platform}",
           "platform_version": "${platform_version}",
           "make": "${make}",
           "model": "${model}", 
           "key1": "${key1}"
      },
         "custom": {
           "user_id": "${user_id}",
           "session_id": "${session_id}", 
           "key1": "${key1}"
      }},
      "payload": {
     "client": {
           "app_package_name": "${appPackageName}",
           "app_title": "${myApp}",
           "app_version_code": "${app_version_code}",
           "app_version_name": "${app_version_name}"
      },
         "env": {
           "platform": "${platform}",
           "platform_version": "${platform_version}",
           "make": "${make}",
           "model": "${model}", 
           "key1": "${key1}"
      },
         "custom": {
           "user_id": "${user_id}",
           "session_id": "${session_id}", 
           "key1": "${key1}"
      }}
    }
  6. In the Parameters tab, create any desired Parameters and enter any Default Expressions you want to use.

  7. When specifying the Connection value, use the format EXTCONNECTION:<partition>.<connection name>.

  8. Save and then submit the new Job Definition.