- Newest
- Most votes
- Most comments
[Edited] Hi!
The only CLI command to list tags for a CloudFront resource is the command you used list-tags-for-resource : https://docs.aws.amazon.com/cli/latest/reference/cloudfront/list-tags-for-resource.html.
The Max Retries error you see comes from AWS's CLI - there are maximum numbers of retries built in: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-retries.html
If you are looking for the tags:
- aws:cloudformation:logical-id
- aws:cloudformation:stack-id
- aws:cloudformation:stack-name
These 3 tags are only added at the CloudFormation stack level and you're right - should be propogated to resources that CloudFormation supports (except for right now, EBS volumes).
If you add more resource tags at the CloudFormation level, for example "project" : "Project ABC", that tag will propagate down to resources supported by CFT. In your case, if you are using CloudFormation (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_CloudFront.html), the AWS::CloudFront::Distribution resource.
I would suggest adding a new tag such as "project": "Project ABC" to help with cost attribution. Have you tried that on the CloudFormation stack to see if they propogate? If that doesn't work, interesting find that the tags aren't propagating properly.
I think that there is only stage tag then.
For me, CLI command and AWS console shows exactly the same tags :)
One pro tip, never show your AWS Account Id publicly as you did in the CLI command.
Ok, I have fixed the problem with CLI (I accidentally used the wrong profile).
Anyways question still is: Why does Cloudformation does not propagate the tags it should
Relevant content
- Accepted Answerasked a year ago
- asked 2 years ago
- asked 6 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a month ago
I am not sure you are completely correct about tagging.
According to the documentation (link I posted above) :
All stack-level tags, including automatically created tags, are propagated to resources that CloudFormation supports.
Also, I am seeing mixed behavior for various resources. When creating lambda the
are added automatically. When creating Cloudfront distribution I am getting tags that I specify on stack level (during CREATE/UPDATE), but not the aforementioned tags.
You're right - I modified the response above. I wonder if it's a bug on the aws:cloudformation:<value> tags.