resource type error while trying to use cloudformation

两盒软妹~` 提交于 2020-02-25 03:39:27

问题


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

Is the "create-stack" parameter of cloudformation correct?

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]

回答1:


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



来源:https://stackoverflow.com/questions/55060734/resource-type-error-while-trying-to-use-cloudformation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!