设置 - 在 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"