Create AWS Redshift External Function
To create the AWS Redshift external function.
Create the AWS Lambda Function. Refer to Creating a Scalar Lambda UDF.
Create an external function object in AWS Redshift. Refer to CREATE EXTERNAL FUNCTION.
Examples:
Redshift Function Definitions, the functions are created using the following format:
CREATE OR REPLACE EXTERNAL FUNCTION thales_token_cts_char(sensitivedata varchar)
RETURNS varchar
STABLE
LAMBDA 'thales_aws_lambda_redshift_cts_token_char'
IAM_ROLE 'arn:aws:youriam/hiftpoweruseraccess';
For example, refer to AWS Dojo Exercises.