我无法使用CloudFormation正确创建/链接CloudWatch警报和DynamoDB表。
DynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
-
AttributeName: "Bucket"
AttributeType: "S"
-
AttributeName: "Key"
AttributeType: "S"
-
AttributeName: "IngestedDate"
AttributeType: "S"
KeySchema:
-
AttributeName: "Bucket"
KeyType: "HASH"
- AttributeName: "Key"
KeyType: "RANGE"
GlobalSecondaryIndexes:
-
IndexName: dateIndex
KeySchema:
-
AttributeName: "Key"
KeyType: "HASH"
- AttributeName: "IngestedDate"
KeyType: "RANGE"
Projection:
ProjectionType: ALL
ProvisionedThroughput:
ReadCapacityUnits: !Ref ReadCapacityUnits
WriteCapacityUnits: !Ref WriteCapacityUnits
ProvisionedThroughput:
ReadCapacityUnits: !Ref ReadCapacityUnits
WriteCapacityUnits: !Ref WriteCapacityUnits
TableName: !Join ["-", [!Ref UniqueIdentifier, "Table"]]
DynamoDBAlarmThroughtputAlarm:
DependsOn: DynamoDBTable
Type: AWS::CloudWatch::Alarm
Properties:
ActionsEnabled: true
AlarmActions:
- !Ref ErrorSNSTopic
AlarmDescription: For when the R/W of a dynamoDB table surpasses a certain throughput.
ComparisonOperator: GreaterThanOrEqualToThreshold
Dimensions:
-
Name: TableName
Value: !Ref DynamoDBTable
EvaluationPeriods: 1
MetricName: ConsumedWriteCapacityUnits
Namespace: AWS/DynamoDB
Period: 300
Statistic: Average
Threshold: 1
警报可以创建,但会显示以下错误消息:联系服务器时出错。
当"修改"它,我看到未选择指标。这是一个错误吗?
的问候。