Is there a way to check my AWS root account Free Tier usage via CLI?
I do not have access to AWS Console (i.e no root password), but I do have the root access key. Therefore, while I cannot use the (browser) billing dashboard approach, I believe I should have full CLI access to check all data.
I tried to search the CLI documentation, but to no avail.
I hope to retrieve similar data as to the Top Free Tier Service by Usage from the AWS Billing Console.
2
Answers
You can use the Cost Explorer API to achieve this:
You’ll need to use
Expression
and supply the necessary parameters to return free tier usage params.https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html
You can use the
get-cost-and-usage
command to retrieve Free Tier usage information.example:
You can adjust the
--time-period
parameter to query for different months or time ranges.P.s The BlendedCost metric includes information about the cost, and you can check if you have exceeded your Free Tier limits or not.