根据文档AWS :: Athena :: NamedQuery,尚不清楚如何将Athena附加到同一堆栈中指定的S3存储桶。
如果我必须从示例中进行猜测,我可以想象您可以编写一个模板,例如
Resources:
MyS3Bucket:
Type: AWS::S3::Bucket
... other params ...
AthenaNamedQuery:
Type: AWS::Athena::NamedQuery
Properties:
Database: "db_name"
Name: "MostExpensiveWorkflow"
QueryString: >
CREATE EXTERNAL TABLE db_name.test_table
(...) LOCATION s3://.../path/to/folder/
Run Code Online (Sandbox Code Playgroud)
像上面的模板可以工作吗?创建堆栈后,该表db_name.test_table可用于运行查询吗?
amazon-s3 amazon-web-services aws-cloudformation amazon-athena