我尝试使用下面提到的用户指南中提供的完全相同的示例。 它可以从控制台运行,但无法使用客户端创建堆栈。
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-namedquery.html
我在尝试执行以下命令时遇到错误:
{
"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"
}
}
}
}
cloudformation的“create-stack”参数是否正确?
aws cloudformation create-stack --stack-name dnd --template-body file://final.json
为什么我会收到这样的资源类型错误?
An error occurred (ValidationError) when calling the CreateStack operation: Template format error: Unrecognized resource types: [AWS::Athena::NamedQuery]
最佳答案
当我按照评论中的建议更新 CLI 版本时,它起作用了。此问题现已关闭。
关于aws-cloudformation - 尝试使用cloudformation时出现资源类型错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55060734/