• If you access the Internet from a virtual private cloud (VPC), ensure that Internet access is enabled for the VPC.
  • In your function, you can add code similar to the following sample. Then, you can invoke the function and view the output in the console to determine network connectivity and service availability.
    • os.system("ping -c 5 " + host_or_ip): determines whether the IP address is reachable.
    • os.system("curl -v " + endpoint): verifies whether the HTTP service is available.
  • You can search the connection logs of the requested service in the corresponding period for requests from Function Compute.