我尝试使用下面提到的用户指南中提供的完全相同的示例。 它可以从控制台运行,但无法使用客户端创建堆栈。
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-namedquery.html
尝试执行以下操作时出现错误:
$data = array_values($data);
cloudformation的“ create-stack”参数正确吗?
aws cloudformation create-stack --stack-name dnd --template-body file://final.json
为什么会出现这样的资源类型错误?
{
"Resources": {
"AthenaNamedQuery": {
"Type": "AWS::Athena::NamedQuery",
"Properties": {
"Database": "swfnetadata",
"Description": "A query that selects all aggregated data",
"Name": "MostExpensiveWorkflow",
"QueryString": "SELECT workflowname, AVG(activitytaskstarted) AS AverageWorkflow FROM swfmetadata WHERE year='17' AND GROUP BY workflowname ORDER BY AverageWorkflow DESC LIMIT 10"
}
}
}
}