Applies to: (tick) Kyvos Enterprise  (error) Kyvos Cloud (SaaS on AWS) (error) Kyvos AWS Marketplace

(error) Kyvos Azure Marketplace  (error) Kyvos GCP Marketplace (error) Kyvos Single Node Installation (Kyvos SNI)


AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you.

Kyvos uses Lambda to start the BI Server instances. The CloudFormation template creates three Lambda functions for:

You can use your externally created Lambda functions with Kyvos. Use any of the following methods to create and configure the external Lambda functions.

Follow the below process to manually create lambda functions:

The process for creating the Lambda functions remains the same for all three functions, except for step 4.

  1. Go to the AWS Console and click Create Function.

  2. On the Create Function page, click the Create Function button, and open the newly created function to configure it.

  3. In Code Source, click Upload from and choose Amazon S3 Location.

    1. Enter the S3 link URL of lambda.jar in the following format:
      https://s3.amazonaws.com/{bucket-name}/{folder-name}/latest/kyvoslambda.jar
      Example: https://s3.amazonaws.com/us-east-1.kyvos/2021.1/latest/kyvoslambda.jar

  4. In Runtime settings, click Edit and change the Handler. Use the below handlers for the respective functions.

    1. Olap function: kyvos.elasticity.lambda.KyvosEC2LambdaHandler::handleRequest

    2. Start function: kyvos.elasticity.lambda.KyvosServiceLambdaHandler::handleRequest

    3. Status function: kyvos.elasticity.lambda.KyvosClusterLambda::handleRequest

  5. Click General configuration > Edit and change the timeout to 15 minutes.

  6. In Environment Variables, use the following Key and Value format:

    • BUCKET={Name of the bucket used in Kyvos}

    • REGION={Name of the region in which Kyvos EC2 instances are deployed)

    • WORK_DIR=(Name of the work directory used at the time of Kyvos deployment)
      Note: The keys entered above are case-sensitive.

  7. In Tags, use the following Key-Value pair:

    • ROLE= KYVOS_LAMBDA

    • UsedBy= Kyvos

    • LAYER= SCALE_LAYER

Configuring Lambda functions

In the kyvosclient.properties file, configure the following properties:

  • SERVER_STATUS_CHECK_URL

  • CLUSTER_STARTUP_URL

In the cluster.properties file located on S3 (${BUCKET_NAME}${WORK_DIR}/cloud_conf/cluster.properties), update the following properties:

  • LAMBDA_NAME

  • LAMBDA_ARN

  • OE_SCHEDULE_RULE

If you have created Lambda using your custom stack, take the values of these properties from stack Outputs as mentioned below:

  • EC2LambdaName in LAMBDA_NAME

  • EC2LambdaArn in LAMBDA_ARN

  • EventRuleID in OE_SCHEDULE_RULE

Configure the value of the below output keys in respective configuration properties

  • ServerStatusCheckUrl in SERVER_STATUS_CHECK_URL

  • ClusterStartUrl in CLUSTER_STARTUP_URL

If not created in the stack, then use the following values by replacing parameters in it with appropriate values.

  • SERVER_STATUS_CHECK_URL: https://${ID-OF-API-GATEWAY}.execute-api.${AWS::Region}.amazonaws.com/kyvosclusterstatus/

  • CLUSTER_STARTUP_URL: https://${ID-OF-API-GATEWAY}.execute-api.${AWS::Region}.amazonaws.com/kyvosclusterstart/

Take the Lambda function details (for the following properties) from the corresponding Lambda function. Take the value for NAME, ARN, and Event rule value from Triggers configuration of Lambda as mentioned in your CloudWatch rule of Event Bridge.

  • LAMBDA_NAME

  • LAMBDA_ARN

  • OE_SCHEDULE_RULE

  1. Login to the AWS CloudFormation portal.

  2. Create functions through the CloudFormation using lambda.json template file available at kyvosmanager_war/kyvosmanager/cloud/azure/templates. You can also download the file from the AWS Installation Files folder.

If the cluster is deployed with Deploy with Enhanced security option, then use the lambda_secure.json file available at the same location.

  1. Step 1: Specify template

    1. In the Prerequisite - Prepare template, select the Template is ready option.

    2. In the Specify template,  select the Upload a template file option to upload your lambda.json template using the Choose File button.

    3. Click NEXT.

  2. Step 2: Specify stack details

    1. Enter a Stack name. Stack name can contain letters (A-Z and a-z), numbers (0-9), and dashes (-). The Kyvos cluster will be deployed in this name, and you cannot edit the name after deployment.

    2. The Parameters area displays the configurations defined in your template. It also allows you to enter custom values to create or update a stack.

    3. Enter details as:

Parameter

Description

S3 Configuration

Enter the name of the S3 bucket to be used for storing Kyvos semantic models

IAM Roles Configurations

Enter the name of the IAM Role that will be attached to the Lambda functions. If blank, the role will be created automatically.

Kyvos Configurations

KyvosWorkDir: Enter the work directory path to be used by Kyvos.

Network Configurations

  • Select the VPC in which lambda functions will be launched.

  • Select the Subnet to be attached to lambda functions.

  • Select the security group which is attached with BI Server and Query Engine.
    NOTE: This area of configuration is displayed only if you are using lambda_secure.json template.

  1. Click Next. The functions are created and displayed on the Outputs page. You can provide the name of these functions while deploying the cluster through the Kyvos Manager Wizard.