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
posta 23 giorni fa113 visualizzazioni
3 Risposte
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
ESPERTO
SriniV
con risposta 23 giorni fa
profile pictureAWS
ESPERTO
verificato 23 giorni fa
  • 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
Risposta accettata

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
con risposta 6 giorni fa
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
ESPERTO
SriniV
con risposta 23 giorni fa
  • Could not find any tagging related differences in the instances. Added the information regarding this attempt to the question.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande