Example AWS Lambda data action with on-premises solution

Note: This article applies to the AWS Lambda data actions integration.

You can use AWS Lambda data actions with on-premises solutions. For more information, see and .

The following information provides example code for an AWS Lambda data action in Genesys Cloud and an AWS Lambda function in your Amazon VPC. The AWS Lambda data action in Genesys Cloud invokes your AWS Lambda function, which retrieves data from your on-premises solution. 

  1. In Genesys Cloud, create an AWS Lambda data action with the following code.

    This data action is associated with your AWS Lambda data actions integration in Genesys Cloud. For more information, see  and .

    Input Contract
    {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "headers": {
          "type": "string"
        },
        "body": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }
    Output Contract
    {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    }
    Configuration Request
    {
      "requestUrlTemplate": "arn:aws:lambda:{{region}}:{{Lambda ID}}:{{Lambda function}}",
      "requestType": "POST",
      "headers": {},
      "requestTemplate": "{ \"url\": \"${input.url}\", \"method\": \"${input.method}\", \"headers\":${input.headers}, \"body\": ${input.body} }"
    }
    Configuration Response
    {
      "translationMap": {},
      "translationMapDefaults": {},
      "successTemplate": "${rawResult}"
    }
  2. In your AWS account, create an AWS Lambda function and upload the (.zip) to the function.

    For more information, see in the AWS documentation.

For more information, see .