Access Alibaba Cloud services over the classic (internal) network
MaxCompute is deployed in the Alibaba Cloud classic network and accesses services deployed in the same network through the cloud service interconnection network. Some jobs contain non-engine code, such as user code in UDFs or third-party package code provided by the system for scenarios such as Hudi external tables. This code runs in security containers that are isolated from external networks. A classic network address whitelist must be configured for these jobs to access services in the classic network.
The following MaxCompute jobs must use a classic network address whitelist to access Alibaba Cloud classic network (internal network) services, such as OSS and DLF, through classic network addresses:
SQL jobs that contain UDFs
External tables that use parsers not built into the engine
Spark, MapReduce, PyODPS, and MaxFrame jobs
Add OSS classic network (internal) addresses to the whitelist
Submit a request form to add OSS classic network domain names and ports to the whitelist. Ports are typically 80 or 443. Include any other required ports in the request.
For example: oss-ap-southeast-1-internal.aliyuncs.com:80,oss-us-west-1-internal.aliyuncs.com:443.
Configure network parameters for jobs
SQL UDFs
If a SQL job contains code that is not built into the engine, such as a UDF, apply for a classic network address whitelist and configure the following parameters before the code accesses Alibaba Cloud classic network (internal network) services:
SET odps.security.outbound.intranetlist=<host>:<port>;
SET odps.internet.access.list=<host>:<port>;External tables that use parsers not built into the engine
Before reading from or writing to OSS external tables in Lance, Hudi, or Delta Lake format, or Custom storage handler external tables, establish network connectivit, otherwise, jobs may fail intermittently. For more information, see Add OSS classic network (internal) addresses to the whitelist.
In addition to the formats listed above, OSS, OTS, and Hologres external tables can be read from and written to directly if no UDFs are involved. For more information, see OSS external tables, Tablestore external tablesand Hologres external tables.
MaxCompute Spark
Configure the following parameters for jobs that access OSS:
spark.hadoop.odps.cupid.trusted.services.access.list=<host>:<port>;MaxFrame
Configure the following parameters for jobs that access OSS:
# MaxFrame SQL execution
from maxframe import options
options.sql.settings = {
"odps.internet.access.list": "<host>:80,<host>:443",
}
# MaxFrame DPE execution
@with_network_options(internal_whitelist=[
"<host>:<port>",
])Access is available after the request is approved and the job's network parameters are configured.