尝试使用 cloudformation 时出现资源类型错误
resource type error while trying to use cloudformation
我尝试使用下面提到的用户指南中提供的完全相同的示例。 它可以从控制台运行,但无法使用客户端创建堆栈。
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 版本时,它起作用了。此问题现已关闭。
我尝试使用下面提到的用户指南中提供的完全相同的示例。 它可以从控制台运行,但无法使用客户端创建堆栈。
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 版本时,它起作用了。此问题现已关闭。