yamlaws-cloudformationamazon-cloudwatchloganomalydetector

How to define AWS::Logs::LogAnomalyDetector via yml file?


I would like to define the following AWS log anomality via yml file.
I have searched the documentation https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loganomalydetector.html , but it is not clear.
How do I define AWS log anomality for :

log group : production-xxxx-monitor 
anomality detection name : logs-anomaly-detector 
frequency : 30min

In AWS console the definition looks like : enter image description here


Solution

  • Example to how to define AWS log anomality via yml is :

    Type: AWS::Logs::LogAnomalyDetector
        Properties:
          AccountId: !Ref 'AWS::AccountId'
          DetectorName: 'logs-anomaly-detector'
          EvaluationFrequency: 'THIRTY_MIN'
          LogGroupArnList: 
            - 'production-xxxx-monitor'