【发布时间】:2021-07-07 15:49:38
【问题描述】:
我正在尝试使用 cloudformation 中的 JSON 在 AWS 系统管理器中创建 cloudwatch 仪表板。我有一个模板,其中堆栈中已经运行了几个 lambda 函数。我更新如下:
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "The AWS CloudFormation template for deployment. Version 1.0",
"Mappings": {
"SourceCode": {
"General": {
"S3Bucket": "solutions",
"KeyPrefix": "connected-solution/latest"
}
}
},
"Resources": {
"dashboard": {
"Type": "AWS::CloudWatch::Dashboard",
"Properties": {
"DashboardName": "Dynamodb-LambdaDashboard-xxx",
"DashboardBody": {
"widgets": [
{
"type": "metric",
"x": 0,
"y": 0,
"width": 12,
"height": 7,
"properties": {
"metrics": [
[
"AWS/DynamoDB",
"UserErrors"
]
],
"view": "timeSeries",
"stacked": false,
"period": 300,
"stat": "Sum",
"region": "us-east-1"
}
}
]
}
}
}
}
}
当我尝试更新堆栈时出现以下错误:
Property validation failure: [Value of property {/DashboardBody} does not match type {String}]
请指教。让我知道如果有任何问题, 谢谢,
【问题讨论】:
标签: json amazon-web-services amazon-cloudformation amazon-cloudwatch dashboard