Search for MySQL templates and select the one with the desired runtime, as shown in Figure 1. Set the parameters as required and click Create Function.
Figure 1 Selecting a function template
After the MySQL function is created, choose Configuration > Environment Variables, enable encryption as required (see Figure 2), and click Save.
Figure 2 Enabling encryption
If the function needs to access RDS APIs, create an agency and grant required permissions.