如何为发电机创建 cloudwatch 警报?

问题描述

设置 - 在 cloudformation 模板中设置一个 dynamodb 和一个 lambda。我想在同一个模板中为 dynamo db 设置 ThrottledRequests 和延迟警报。谁有例子?

Resources:
  errorAlarm:
    Type: AWS::CloudWatch::Alarm
    Properties:
      AlarmName: error
      AlarmActions:
        - !Ref errorTopic
      MetricName: "Errors"
      Dimensions: 
      - Name: "FunctionName"
      - value: !Ref dbQueryLambda

  errorTopic:
    Type: AWS::SNS::Topic
    Properties:
      TopicName: error
      Subscription: 
      - Protocol: email
      - Endpoint: !Ref supportEmail
     
 dbTable:
      Type: AWS::DynamoDB::Table
      Properties:
        AttributeDeFinitions:
          -
            AttributeName: "Bucket"
            AttributeType: "S"
          -
            AttributeName: "Key"
            AttributeType: "S"
 
        KeySchema:
          -
            AttributeName: "Bucket"
            KeyType: "HASH"
          - AttributeName: "Key"
            KeyType: "RANGE"
  

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)