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 public.thales_crdp_protect_bulk_fpe_char(sensitivedata varchar)
RETURNS varchar
STABLE
lambda 'thales-redshift-crdp-protect-bulk-fpe-char'
iam_role 'arn:aws:iam::yoruproject:role/redshiftpoweruseraccess'
CREATE OR REPLACE EXTERNAL FUNCTION public.thales_crdp_protect_fpe_char(sensitivedata varchar)
RETURNS varchar
STABLE
lambda 'thales-redshift-crdp-protect-fpe-char'
iam_role 'arn:aws:iam:: yoruproject:role/redshiftpoweruseraccess'
For example, refer to AWS Dojo Exercises.