Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026.
We will start enforcing it in phases. For more information on the details of Python end of life
and migration options, 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.