Help Center/
FunctionGraph/
Developer Guide/
Development Tools/
Serverless Framework/
Event list/
OBS Events
Updated on 2023-11-22 GMT+08:00
OBS Events
Huawei Cloud functions can be triggered by different event sources, which can be defined and configured through events.
OBS Events
In this example, an OBS event is set. Each time an object is uploaded to my-service-resource, the event triggers the first function.
# serverless.yml functions: first: handler: index.first events: - obs: bucket: bucket events: - s3:ObjectCreated:Put - s3:ObjectCreated:Post
// index.js exports.first = async (event, context) => { const response = { statusCode: 200, body: JSON.stringify({ message: 'Hello!', }), }; return response; };
Parent topic: Event list
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot