Incompatible tags definition for AWS::Athena::WorkGroup
See original GitHub issueCurrently 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:
- Created 3 years ago
- Reactions:2
- Comments:10 (9 by maintainers)
Top GitHub Comments
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”:
I also ran into this today. Instead of creating a new construct, I just did it in inline.