resource type error while trying to use cloudforma

2019-07-17 04:15发布

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条回答
爷、活的狠高调
2楼-- · 2019-07-17 04:28

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

查看更多
登录 后发表回答