我正在使用以下命令创建新规则
aws iot create-topic-rule --rule-name my-rule --topic-rule-payload file://myrule.json
内容的myrule.json
内容是
{
"sql": "SELECT * FROM 'iot/test'",
"ruleDisabled": false,
"awsIotSqlVersion": "2016-03-23-beta",
"actions": [{
"dynamoDB": {
"tableName": "my-dynamodb-table",
"roleArn": "arn:aws:iam::12345*****:role/my-iot-role",
"hashKeyField": "topic",
"hashKeyValue": "${topic(2)}",
"rangeKeyField": "timestamp",
"rangeKeyValue": "${timestamp()}"
}
}]
}
我收到以下错误。
调用 CreateTopicRule 操作时发生客户端错误 (InvalidRequestException):检测到 1 个验证错误:“ruleName”处的值“my-rule”未能满足约束:成员必须满足正则表达式模式:^[a-zA-Z0-9_] +$
请问有人可以帮忙吗?