Athena User Defined Function Labs

Amazon Athena now supports user-defined functions (UDFs), a feature that enables customers to write custom scalar functions and invoke them in SQL queries. While Athena provides built-in functions, UDFs enable customers to perform custom processing such as compressing and decompressing data, redacting sensitive data, or applying customized decryption. Customers can write their UDFs in Java using the Athena Query Federation SDK. When a UDF is used in a SQL query submitted to Athena, it is invoked and executed on AWS Lambda. UDFs can be used in both SELECT and FILTER clauses of a SQL query. Users can invoke multiple UDFs in the same query.

Athena UDF functionality is available in Preview mode in the us-east-1 (N. Virginia) region. These labs cover basic functionalities of Athena UDF, writing your own UDF, building and publishing your UDF to Serverless Application Repository, configuring the UDF connector application and then using the UDF in the Athena queries.

Some of the use cases like redacting sensitive information, PII, Credit Card, SSN etc could be implemented as a UDF. More documentation around querying Athena UDF can be found here: Querying UDF

Follow the steps one-by-one to complete these labs: