aws-cloudformation - 尝试使用cloudformation时出现资源类型错误

标签 aws-cloudformation amazon-athena

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

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/

相关文章:

amazon-web-services - AWS API网关需要手动部署吗?

amazon-web-services - 如何检查CloudFormation模板中未定义的资源属性?

boto3 - 如何通过 boto3 访问 eu-west-1 中我的 Athena 表的 Athena/Glue 目录?

amazon-web-services - 无法删除 Athena table

amazon-web-services - 无法更改现有 AWS::AutoScaling::Trigger 的任何属性

command-line-interface - CloudFormation 的真正命令行客户端?

amazon-web-services - jinja 内的 AWS Cloud-formation 内在函数

hadoop - Athena 无法使用 LazySimpleSerDe 解析集合

sql - 急速 SQL : Changing time zones using time zone string coming as a result of a query is not working

amazon-web-services - 使用分区查询 Amazon Athena