Establish trust between your AWS Lambda function and VantageCloud Lake environment - Teradata VantageCloud Lake

Lake - Using Queries, UDFs, and External Stored Procedures

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-08-12
dita:mapPath
vgj1683671089901.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
vgj1683671089901

User Defined Cloud Functions are associated with an AWS Lambda function and an IAM role used to invoke the AWS Lambda function from the UDCF. There are no restrictions on which UDCF can be associated to which AWS Lambda.

  1. Create an AWS Lambda function that conforms to the supported data format. Refer to Examples: Working with UDCFs for an explicit implementation.
  2. Create an IAM role to allow specific principals to invoke your Lambda function with the following permissions:
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "policyInCustomerAccount",
                "Effect": "Allow",
                "Action": "lambda:InvokeFunction",
                "Resource": "<lambda_function_arn>"
            }
        ]
    }
  3. Edit the trust policy of the IAM role you created with the ARN of the role resource (returned in the response of the udcf status command as a principal) to allow the VantageCloud Lake environment to assume it.
    The arn_of_cog_role_returned_in_response_of_udcf_status_command is required only if UDCFs need to be executed on compute clusters.
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Principal": {
                    "AWS": [
                      "<arn_of_pog_role_returned_in_response_of_udcf_status_command>",
                      "<arn_of_cog_role_returned_in_response_of_udcf_status_command>"
                    ]
                },
                "Service": "lambda.amazonaws.com",
                "Action": "sts:AssumeRole"
            }
        ]
    }