<img alt="" src="https://secure.leadforensics.com/150446.png " style="display:none;">
Go to top icon

AWS Programmatic Billing Access

Sandeep Dhawale Jul 06, 2012

AWS AWS CSV Report cloud computing Technology AWS Programmatic Billing Access

When to use programmatic billing access

Programmatic Billing Access advantages excising Amazon Simple Storage Service (Amazon S3) APIs so you can build applications that reference your billing data from a CSV (comma separated value) file stored in an Amazon S3 bucket.

Steps programmatic billing access as follows -

  1. Log in to Amazon Web portal http://aws.amazon.com/
  2. Amazon Web Portal

  3. Then click on My Account/ Console Tab. Select My Account you will get Amazon Web Services Sign in window as follows - You may sign in using your existing Amazon.com account and password. (Put your username and password and click on Sign in using Our Server Security Tab)
  4. Amazon Web Services Sign in Window

  5. You will get Access to your AWS Manage Account.
  6. After login into AWS click on My Account/ Console Tab and Select Account Activity Tab. You will get following Window
  7. Amazon My Account Activity

  8. In Open Window Select Billing Preferences TAB As follows
  9. AWS Billing Preferences

  10. If you have access on Billing Preferences TAB then you will get following window, and if you have already enabled CSV report for your billing statement
  11. AWS Billing Preferences TAB

  12. If you haven’t enabled CSV report then you need to enable CSV Report by Sign up for Programmatic Billing Access by providing a bucket location for the CSV files as follows.

Steps to enable CSV Report

  1. Sign into the AWS Management Console.
  2. Then click on My Account/ Console Tab. Select My Account you will get Amazon Web Services Sign in window as follows - You may sign in using your existing Amazon.com account and password. (Put your username and password and click on Sign in using Our Server Security Tab)
  3. You will get Access to your AWS Manage Account.
  4. After login into AWS click on My Account/ Console Tab. And Select Account Activity Tab
  5. In Open Window Select Billing Preferences TAB
  6. In the CSV Report section, click Sign up Now to enable CSV reporting.
  7. CSV Report Sign up Now

  8. In the Programmatic Access section, sign up for Programmatic Billing Access by clicking Sign up Now.
  9. Programmatic Billing Access Sign up Now

  10. Enter the name of the bucket to contain the CSV file.
  11. Click Sample Policy link to display the policy for your bucket.
  12. Sample Policy

  13. AWS provides you with a policy for your bucket and account.
  14. Copy the policy from your Billing Preferences page so you can attach it to the bucket to contain the CSV file in a later step.
  15. Click Save Changes.
  16. Open the Amazon S3 console at https://console.aws.amazon.com/s3.
  17. Attach the sample policy to the bucket that will contain the CSV file.
  18. Verify your bucket is set up correctly on the Billing Preferences page. If correct, you will see Programmatic Access is Enabled.
  19. Set a policy on the bucket granting AWS access to publish your CSV files to the bucket at the specified location. (Note- The CSV files are stored in Amazon S3 at standard Amazon S3 pricing). Following is the screen shot for more info -
  20. AWS Policy on Bucket

  21. Use an application, such as Microsoft Excel, to parse the billing data. Or, use the existing Amazon S3 API to write applications that access your billing data.

Steps to Create Bucket

Before you can upload data into Amazon S3, you must create a bucket to store the data in. Buckets have configuration properties, including their geographical region, which has access to the objects in the bucket, and other metadata, such as the storage class of the objects in the bucket.

Note - You are not charged for creating a bucket; you are only charged for storing objects in the bucket and for transferring objects in and out of the bucket.

To create a bucket -

  1. Sign into the AWS Management Console and open the Amazon S3 console.
  2. Click Create Bucket. The Create a Bucket dialog box appears.

    Create Bucket

  3. Enter a bucket name in the Bucket Name field.
  4. In the Region drop-down list box, select a region.
  5. Do one of the following.
  6. Region Drop-Down List

  7. If you clicked Set Up Logging, the Create a Bucket - Set Up Logging dialog box appears so that you can set up logging:

    Set Up Logging

    • Select the Enabled check box.
    • This choice enables logging.

    • In Target Bucket, select the bucket where you want the log files stored.
    • In Target Prefix, you have the option of specifying a prefix for the name of the log files.

      Amazon S3 adds the prefix to the log file names when storing them in your bucket. For example, if you specify the prefix "logs/," all logs stored in the target bucket are prefixed with logs/, so, all the logs will be stored in the logs folder.

  8. Click Create.
    If Amazon S3 successfully creates your bucket, the console displays your bucket with Created name as follows.

    Amazon S3 Create Bucket

Benefits of Programmatic Billing Access

  1. CSV file - you get a detailed report in a format that is readable by many common applications.
  2. Easy Viewing in Excel - you can open the file directly into Microsoft Excel, and use pivot tables to create different views.
  3. Leverage Amazon S3 API - the CSV file is stored in Amazon S3 as an object.

References:

http://docs.amazonwebservices.com/awsaccountbilling/latest/about/programaccess.html
http://docs.amazonwebservices.com/AmazonS3/latest/UG/EditingBucketPermissions.html

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.