- Newest
- Most votes
- Most comments
Hi,
The error message "Duplicate tag keys found. Please note that Tag keys are case insensitive" occurs when there are duplicate tag keys in the IAM Role resource being created, even if the keys have different cases. Check this out:
https://docs.aws.amazon.com/it_it/IAM/latest/UserGuide/access_tags.html
BTW, this error can occur even if the IAM Role resource does not use any tags. To prevent duplicate tags with a key that varies only by case, use the "aws:TagKeys" condition to define the tag keys that your users can apply, or use tag key-name condition key to specify what tag key-value pairs can be passed in a request to tag or untag an AWS resource
You can check all the resources in the stack that have tags defined and verify if any of them have duplicate tag keys. To do this, you can navigate to the CloudFormation console, select your stack, and view the "Resources" tab. From there, you can expand each resource and look for tags.
Hi, To define stack-level tags in a CloudFormation YAML file, you can use the Tags property at the root level of your template. Here's an example:
AWSTemplateFormatVersion: '2010-09-09' Description: Your CloudFormation stack description Tags: StackLevelTag1: StackLevelValue1 StackLevelTag2: StackLevelValue2 Resources: ...
Make sure to replace StackLevelTag1, StackLevelValue1, etc. with your actual tag key-value pairs. Remember that stack-level tags are not specific to any particular resource. They are used to provide metadata at the stack level. Also, remember to adjust the resource type (AWS::EC2::Instance in the example) and properties according to your resource's definition.
Relevant content
- Accepted Answerasked 9 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 5 months ago
- How do I update a CloudFormation stack that's failing because of a resource that I manually deleted?AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
Thank you Stefano. There seems to be duplicate keys in our json config file. Do you know how to define "stack-level" tags inside the yml file?