@bagui
According to AWS official documentation, there is no API function that allows you to get actual data on the use of billing. Instead, you can get the expected billing data as:
To get started, all you have to do is provide an Amazon S3 bucket for your billing information, grant AWS billing system permission to record it, and go to the billing settings page to provide programmatic access:
As soon as you do this, we will generate an evaluation account several times a day and store it in a bucket, where you can load and process it as you wish. We will also create a final invoice at the end of each billing period.
Billing reports are generated as CSV files and contain many details:
Here is a list of fields (read the documentation for more information):
- Account id
- Payer Account Name and ID
- Associated account name and identifier (for consolidated billing)
- Record type
- Record id
- The start and end dates of the payment period
- Billing Date
- Tax address
- Payer order number
- product code
- The product's name
- Record seller
- Type of use
- Operation
- Speed ββid
- Item Description
- Start of use and use End date and time
- Usage Amount
- Mixed rate (for consolidated billing)
- Currency code
- Cost before tax
- Loans
- Tax amount
- Tax type
- total cost
AWS Documentation Link: Programmatic Access to AWS Billing Data
thanks
source share