I am trying to narrow aws billing per environmenttype tag to previous month, but unfortunately it always display last year.
The command I am trying is:
sourcetype="aws:billing" | search EnvironmentType CurrencyCode=USD | stats sum(TotalCost) as TotalCost, first(CurrencyCode) as CurrencyCode by EnvironmentType | eval TotalCost=round(TotalCost,2)
Even if I manually change it to last month it always gives me all.