Help Center/ FunctionGraph/ Getting Started/ Getting Started with Common Practices
Updated on 2025-09-11 GMT+08:00

Getting Started with Common Practices

Operation Guide

You can create a function and deploy code in either of the following ways:

  • FunctionGraph console: It allows you to quickly create executable functions on the GUI, which is suitable for building lightweight applications and quick verification. For details, see Creating a Function from Scratch and Executing the Function.
  • VS Code: Based on the Huawei Cloud FunctionGraph VS Code plug-in, you can easily create and execute functions in the local code editor. It is suitable for small teams and individual developers. For details, see Local Debugging with VSCode.
  • Serverless Devs: You can manage multiple functions using the YAML configuration file based on the open-source CLI tool. It is suitable for complex projects with many functions or automatic deployment. For details, see Introduction.
  • Serverless Framework: The Serverless Framework V3 uses the YAML configuration file to maintain the full lifecycle of functions, which is suitable for users familiar with the tool. For details, see Quick Start.

Best Practices

After understanding basic operations such as creating a function, you can follow FunctionGraph's common practices to implement your services.

This section describes common practices of FunctionGraph. For details, see FunctionGraph Best Practices.

Table 1 Common practices

Practice

Description

Using FunctionGraph to Compress Images in OBS

Use FunctionGraph to compress images.

Using FunctionGraph to Watermark Images in OBS

Use FunctionGraph to watermark images.

Building an HTTP Function Using an Existing Spring Boot Project

Deploy a Spring Boot application as an HTTP function on FunctionGraph.

Integrating with LTS to Analyze Logs in Real Time

  • Use Log Tank Service (LTS) to collect, process, and convert task logs of servers, such as Elastic Cloud Servers (ECSs).
  • Obtain log data with an LTS trigger, analyze and process key information in logs using a custom function, and filter alarm logs.
  • Use Simple Message Notification (SMN) to push alarm messages to service personnel by SMS or email.
  • Store processed log data in a specified OBS bucket for processing.

Integrating with CTS to Analyze Login/Logout Security

  • Use Cloud Trace Service (CTS) to collect real-time records of cloud resource operations.
  • Obtain operation records of subscribed cloud resources with a CTS trigger, analyze and process the records using a custom function, and report alarms.
  • Use SMN to push alarm messages to service personnel by SMS or email.

Processing IoT Data

Use FunctionGraph and IoT Device Access (IoTDA) to process status data reported by IoT devices. IoT devices are managed on the IoTDA platform. Their data is transferred from IoTDA to trigger the FunctionGraph functions you have compiled for processing.

This combination is suitable for processing device data and storing them in OBS, structuring and cleansing data and storing them in a database, and sending event notifications for device status changes.

Workflow + Function: Automatically Processing Data in OBS

Use FunctionGraph to process OBS data.

Using FunctionGraph to Deploy Stable Diffusion for AI Drawing

Deploy Stable-Diffusion applications in the application center of FunctionGraph and provides multiple methods for customizing AI drawing applications.