Amazon AWS: How Do I Programmatically Calculate My Spending?

Viewed 5778
7 Answers

As this question was asked long back, a lot has changed now. You can access cost programmatically using Cost Explorer API. With this API data will be available for last 12 months. Also each paginated request will incur $0.01. Though the cost will not available in real time, it takes 24 hours as Cost Explorer refreshes your cost data at least once every 24 hours where it uses the same data that is used to generate AWS Cost and Usage Reports.

Reference: Analyzing your costs with Cost Explorer

Related