Amazon Redshift will no longer support the creation of new Python UDFs starting November 1, 2025.
If you would like to use Python UDFs, create the UDFs prior to that date.
Existing Python UDFs will continue to function as normal. For more information, see the
blog post
Python language support for UDFs
You can create a custom UDF based on the Python programming language. The Python 2.7 standard library
-
ScrolledText
-
Tix
-
Tkinter
-
tk
-
turtle
-
smtpd
In addition to the Python Standard Library, the following modules are part of the Amazon Redshift implementation:
You can also import your own custom Python modules and make them available for use in UDFs by executing a CREATE LIBRARY command. For more information, see Example: Importing custom Python library modules.
Important
Amazon Redshift blocks all network access and write access to the file system through UDFs.
Note
Python 3 isn’t available for Python UDFs. To get Python 3 support for Amazon Redshift UDFs, use Scalar Lambda UDFs instead.