question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatible tags definition for AWS::Athena::WorkGroup

See original GitHub issue

Currently it is not possible to create an AWS::Athena::WorkGroup due to the way tags are defined.

The WorkGroup resource expects tags to be a list of objects. The definition in the autogenerated code though has another level. Something like:

"Tags": {
  "Tags": [{
    "key": "a",
    "value": "b"
  }]
}

Even if no tags are set for the resource, the generated template holds an empty object:

"Tags": {},

This format is not supported and CloudFormation fails with an Internal Failure.

Reproduction Steps

This code compiles. Note the nested tags definition.

    new athena.CfnWorkGroup(scope, 'Athena-Workgroup', {
        name: 'HelloWorld',
        description: 'A WorkGroup,
        recursiveDeleteOption: true,
        state: 'ENABLED',
        tags: {
            tags: [{
                key: 'a',
                value: 'b',
            }]
        },
        workGroupConfiguration: {
            requesterPaysEnabled: true,
            resultConfiguration: {
                outputLocation: `s3://${bucket.bucketName}/athena/results/`,
                encryptionConfiguration: {
                    encryptionOption: 'CSE_KMS',
                    kmsKey: key.keyArn,
                },
            },
        }
    });

If you remove the outer tags, it won’t compile.

If you remove the whole tags definition it again compiles, but fails to create the resource due to the unexpected default value of {}.

Error Log

Internal Failure 😉

Environment

All of them

Other

I wanted to go ahead and fix the problem myself but since this is part of the autogenerated code which even seems to be not in the repo, I wouldn’t know how.


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
l8oncommented, Mar 27, 2020

I have run into the same issue.

Thanks to this report, I was able I work around it by using one of the “Escape Hatches”:

export class WorkAroundGroup extends CfnWorkGroup {
  constructor(scope: Construct, id: string, props?: CfnWorkGroupProps) {
    super(scope, id, props);
    // Work around issue with the way Tags are encoded
    // Tags needs to be a non-empty array, but the default CfnWorkGroup creates an empty object `{}`
    // This empty object fails the request
    this.addPropertyOverride('Tags', [{ key: 'foo', value: 'bar', }]);
  }
}
1reaction
blimmercommented, Jun 16, 2020

I also ran into this today. Instead of creating a new construct, I just did it in inline.

const workgroup = new athena.CfnWorkGroup(this, "AthenaWorkGroup", {
  name: "my-workgroup",
  description: "my real description goes here",
});
// Workaround for a cdk bug. We can remove this when this issue is resolved:
// https://github.com/aws/aws-cdk/issues/6936
workgroup.addPropertyOverride("Tags", [{ key: "foo", value: "bar" }]);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Update AWS Athena workgroup using CloudFormation template
This question is in a collective: a subcommunity defined by tags with relevant content and experts. The Overflow Blog. Best practices to ...
Read more >
Tagging Athena resources - AWS Documentation
A tag is a label that you assign to an Athena resource. Each tag consists of a key and an optional value, both...
Read more >
How to fix Minecraft's 'Incomplete set of tags received from ...
This error is caused by a mismatching set of mods from the server-side and the client-side. This is most likely because the Minecraft...
Read more >
What does "Incomplete set of tags" mean? : r/fabricmc - Reddit
Basically, incomplete tags revived from server means you have a mod installed locally that is not on the server. Make sure any mods...
Read more >
Minecraft | Incomplete Set of Tags Received from Server ...
Minecraft | Incomplete Set of Tags Received from Server Please Contact Server Operator Receiving this Error basically means you are trying ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found