尝试使用cloudformation时发生资源类型错误 [英] resource type error while trying to use cloudformation

查看:150
本文介绍了尝试使用cloudformation时发生资源类型错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用下面提到的用户指南中提供的完全相同的示例。 它可以从控制台运行,但是无法使用客户端创建堆栈。

I tried to use the exact same example provided in the user guide mentioned below. It works from console but fails to create stack using client.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-namedquery。 html

尝试执行以下操作时出现错误:

I got an error while trying to execute the following:

{
  "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"
      }
    }
  }
}


aws cloudformation create-stack --stack-name dnd --template-body文件:/ /final.json

aws cloudformation create-stack --stack-name dnd --template-body file://final.json

为什么会出现这样的资源类型错误?

Why am I getting a resource type error like this?

An error occurred (ValidationError) when calling the CreateStack operation: Template format error: Unrecognized resource types: [AWS::Athena::NamedQuery]


推荐答案

当我按照注释中的建议更新CLI版本时,此方法有效。该问题现已关闭。

It worked when I updated my CLI version as suggested in the comment. This issue is now closed.

这篇关于尝试使用cloudformation时发生资源类型错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆