0
votes

I am specifying a NamedQuery in my CloudFormation template and I am following the documentation from here.

I have also created a WorkGroup in my CloudFormation template following the documentation from here. I have my NamedQuery configured so that it DependsOn my WorkGroup.

Everything deploys fine when I deploy the CloudFormation stack. The problem is that my named query always ends up in the "primary" workgroup on Athena. How can I get it to end up in my custom WorkGroup that is created in my CloudFormation template? In the docs, it doesn't seem like specifying WorkGroup is supported by CloudFormation, so is this even possible?

1

1 Answers

1
votes

From the CloudFormation documentation you link to it looks like you can't associate a named query with a work group with CloudFormation at this time. As you note, there is no WorkGroup property of the AWS::Athena::NamedQuery resource, and DependsOn is just a CloudFormation feature that controls the order in which resources are created.

You have to options: either implement a custom resource (or resource provider), or wait for CloudFormation to implement the WorkGroup property (you can submit an issue in the aws-cloudformation-coverage-roadmap repo to tell the team that you need the feature).