Building a Program
Download index.zip to create an alarm log analysis function from scratch.
Creating a Function
Create a function by uploading the sample code package to extract logs. Select the Python 2.7 runtime and the agency serverless_trust created in Creating an Agency. For details about how to create a function, see Creating an Event Function.
This function analyzes received operation records, filters logins or logouts from unauthorized IP addresses using a whitelist, and sends alarms under a specified SMN topic. This function can be used to build an account security monitoring service.
Setting Environment Variables
On the Configuration tab page of the function details page, set the environment variables listed in Table 1.
Environment Variable |
Description |
---|---|
SMN_Topic |
SMN topic. |
RegionName |
Region name. |
IP |
IP address whitelist. |
Set the environment variables by following the procedure in Environment Variables.
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