Events
Simply put, events are the things that trigger your functions to run.
If you are using Huawei Cloud as your provider, events in the service are limited to the Huawei Cloud APIG and OBS. For details, see Event list.
Upon deployment, the Framework will set up the corresponding event configuration your function should listen to.
Configuration
# serverless.yml
functions:
first: # Function name
handler: index.http # Reference to file index.js & exported function 'http'
events:
- apigw:
env_id: DEFAULT_ENVIRONMENT_RELEASE_ID
env_name: RELEASE
req_method: GET
path: /test
name: API_test
Currently, only one event definition per function is supported.
Types
The Serverless Framework supports OBS and APIG events of the FunctionGraph. For details, see Event list.
Deployment
serverless deploy
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot