Generating AWS billing details using aws java applications

+3 votes

Would it be possible to use application say Java API to generate billing information from aws for ec2 instances, s3 buckets and ebs volumes. Can we have an api that gives specific entity wise hourly billing reports. Do we have such applications that are there in the market and I do not know of?

Apr 9, 2018 in AWS by code_ninja
• 6,300 points
2,148 views
Woah nice. I'm interested in this idea. I'd fancy one myself.

4 answers to this question.

+3 votes

There definitely are no applications that give you AWS billing information. However you may consider this,

Start by turning on the detailed billing report I am referring to a Dashboard:

  1. Configure the kind of billing reports to be generated

  2. AWS will generate billing info as CSV files to a (pre)configured bucket several times an hour

  3. Use may use REST API or S3 Java API to get the information from the bucket when needed. And you should be good to go.

answered Apr 9, 2018 by hemant
• 5,790 points
+1 vote

Billing Reports are generated as CSV files and include plenty of details:

Here is a list of the fields (read the documentation for more information):

  • Invoice ID
  • Payer Account Name and ID
  • Linked Account Name and ID (for Consolidated Billing)
  • Record Type
  • Record ID
  • Billing Period Start and End Dates
  • Invoice Date
  • Taxation Address
  • Payer Purchase Order Number
  • Product Code
  • Product Name
  • Seller of Record
  • Usage Type
  • Operation
  • Rate ID
  • Item Description
  • Usage Start and Usage End Date and Time
  • Usage Quantity
  • Blended Rate (for Consolidated Billing)
  • Currency Code
  • Cost Before Tax
  • Credits
  • Tax Amount
  • Tax Type
  • Total Cost

Referred AWS documentation: Programmatic Access to AWS Billing Data

answered Oct 16, 2018 by Robert
+1 vote
To get started, all you need to do is to provide an Amazon S3 bucket for your billing data, give the AWS Billing system permission to write to it, and visit the Billing Preferences page to enable programmatic access:

Once you have done this, we will generate an Estimated bill several times per day and store it in the bucket, where you can download and process it as desired. We will also generate a Final bill at the conclusion of each billing period.
answered Oct 16, 2018 by punit
+1 vote

AWS has released the CostExplorer API for the Java SDK. You can find the documentation here: https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/index.html

answered Oct 16, 2018 by rahul

Related Questions In AWS

+1 vote
1 answer

AWS billing information using AWS java sdk

There are no APIs to get AWS ...READ MORE

answered Jul 26, 2018 in AWS by Priyaj
• 58,020 points
800 views
0 votes
1 answer

How to access AWS Lambda environment variables using Java?

In Spring Core change the PropertySourcesPlaceholderConfigurer class can ...READ MORE

answered Oct 24, 2018 in AWS by Priyaj
• 58,020 points
2,792 views
0 votes
2 answers

Launching an EC2 Instance using AWS SDK Java

package com.ec2application.ec2application; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.regions.Regions; import com.amazonaws.services.ec2.AmazonEC2; import ...READ MORE

answered Jan 22, 2019 in AWS by Priyaj
• 58,020 points
6,887 views
0 votes
1 answer

Stopping EC2 Instance using Java AWS SDK

You can follow the following steps:- 1. Create ...READ MORE

answered Jan 22, 2019 in AWS by Priyaj
• 58,020 points
1,648 views
0 votes
1 answer
0 votes
1 answer
+2 votes
3 answers
0 votes
1 answer

AWS:Using S3 with EC2 instances

Yes, it can be used for instances ...READ MORE

answered Jun 26, 2018 in AWS by hemant
• 5,790 points
6,326 views
+2 votes
3 answers

Is it possible to ping AWS EC2 instance

1.Go to EC2 Dashboard and click "Running ...READ MORE

answered Nov 13, 2020 in AWS by shivam
• 140 points

edited Nov 13, 2020 by Gitika 20,535 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP