I'm calling boto3 get_cost_and_usage function with below request to fetch daily cost grouped by services and "Name" tag:
result = client.get_cost_and_usage(
TimePeriod = {
'Start': '2020-10-31',
'End': '2020-11-02'
},
Granularity = 'DAILY',
Metrics = ["BlendedCost"],
GroupBy = [
{
'Type': 'DIMENSION',
'Key': 'SERVICE'
},
{
'Type': 'TAG',
'Key': 'Name'
}
]
)
In the response, I'm getting all the costs for each service and Name tags for each day, however the total cost for each day is empty [ "Total": {} ]:
"ResultsByTime": [
{
"Estimated": true,
"Groups": [
{
...
}
"TimePeriod": {
"End": "2020-11-01",
"Start": "2020-10-31"
},
"Total": {}
},
...
]
Please tell me if anything is wrong here? I also tried with "UnblendedCost", "AmortizedCost" in Metrics and grouped by only services but it is the same issue i.e., total cost is not coming.
Kindly help me out here.