How to see all tagged resources in Cost Explorer

0

I created User-defined cost allocation tag "customer" on a few years ago. User-defined cost allocation tags page

I have tagged most of our resources in AWS over 5 months ago. I have been the only one doing the tagging. Tags tab on the i3.2xlarge instance

I noticed that two our i3.2xlarge instances can only be listed under filter "No tag key: customer" even though I have given the resources the tag with Key: customer and Value: value3. Cost value was around $650 Cost Explorer with Instance type Dimension and No tag key: customer filter

When I filter with tag customer:value3, it shows our g5.xlarge with same tag value and also tagged S3 and EC2-Other resources. I verified that this is the case also by using Dimension: Instance type. It lists the i3.2xlarge in there with cost value $0.00. Cost Explorer with tag filter customer:value3

Also, AWS Resource Groups, Tagging, Tag Editor will find the i3.2xlarge instance with the customer:value3, so the tag definitely exists. Used Resource Groups to search the tagged instances successfully Seems weird that some of tagged resources are showing as tagged and some are not.

Edit: I tried to find differences in tagging using aws ec2 describe-instances -output but could not find any. The commands which I ran are listed below:

user@ubuntu-server:~$ aws ec2 describe-instances --instance-id i-xxxx --region eu-north-1 > aws.describe.i3.2xlarge.json
user@ubuntu-server:~$ aws ec2 describe-instances --instance-id i-yyyy --region eu-north-1 > aws.describe.g5.xlarge.json
user@ubuntu-server:~$ grep -e "Tag" aws.describe.i3.2xlarge.json
                    "Tags": [
user@ubuntu-server:~$ grep -e "Tag" aws.describe.g5.xlarge.json
                    "Tags": [
user@ubuntu-server:~$ jq .Reservations[].Instances[].Tags aws.describe.i3.2xlarge.json
[
  {
    "Value": "i3.2xlarge server",
    "Key": "Name"
  },
  {
    "Value": "value3",
    "Key": "customer"
  },
  {
    "Value": "Production",
    "Key": "stage"
  }
]
user@ubuntu-server:~$ jq .Reservations[].Instances[].Tags aws.describe.g5.xlarge.json
[
  {
    "Value": "value2",
    "Key": "customer"
  },
  {
    "Value": "Production",
    "Key": "stage"
  },
  {
    "Value": "g5.xlarge server",
    "Key": "Name"
  }
]
Olli
已提问 23 天前113 查看次数
3 回答
1

It appears that the i3.2xlarge instances are not properly associating the "customer:value3" tag for cost allocation purposes, even though the tag is correctly applied to the instances and visible in other tools.

  1. Check that the "customer" tag is enabled for cost allocation in the Billing and Cost Management console under "Cost allocation tags".
  2. Verify the tag is correctly formatted as "customer" with a value of "value3". Ensure there are no extra spaces or special characters.
  3. Wait 24-48 hours and check the cost allocation again. There can sometimes be a delay before tags are fully processed for cost reporting.

https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/activate-built-in-tags.html

profile pictureAWS
专家
SriniV
已回答 23 天前
profile pictureAWS
专家
已审核 23 天前
  • I added some screenshots to the question to back up my claim a bit.

    1. The tag is enabled and is selectable in the Cost Explorer tag filter.
    2. I have quadruple-checked the tags and format for the tag. I don't think the issue is here.
    3. I certainly have noticed the delay. I created the tags for the "missing" instances over 5 months ago.
0
已接受的回答

Okay, so we are using Reserved Instances and I have come to a conclusion that these costs cannot be filtered with User-defined cost allocation tags. I noticed this when I grouped by Usage type, the "missing resources" are listed as HeavyUsage:instance.type and this is related to Reserved Instances. Sadly this makes using the tags on Cost Explorer a bit harder as one needs to keep track on RIs separately.

Olli
已回答 6 天前
0

Thanks for providing the screen shots and details. Could you run command "aws ec2 describe-instances --instance-id <instance-id>" on both the instances g5.xlarge and i3.2xlarge. If there is any difference in Tags related configuration between the two instances (example: PropagateTagsToVolumeOnCreation). If there is no difference, please open support ticket for further investigation.

profile pictureAWS
专家
SriniV
已回答 23 天前
  • Could not find any tagging related differences in the instances. Added the information regarding this attempt to the question.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则