Do you have multiple client instances setup in a single Amazon account? How can you break down the costs per customer?
AWS now provide a way to break your billing down and show usage per instance, this allows you to break down costs per client. The method for doing this is to “tag” each instance with a name, then that name will be displayed on the bill. This allows for easy breakdown to see “who” has been using “what” in an amazon account.
Services that can be tagged:
1) EC2
2) S3
3) RDS
The first step is to “tag” each of the EC2 instances with a name that will be used on billing. In the example below I have set the key as “Accounts” and the value to “Client1″.
Repeat the above for any RDS and S3 buckets. To tag an S3 bucket, click on the bucket and then click “Properties”.
Now we will set up the billing. Log into your Amazon account and go to the “Usage Reports” page. Click on “Billing Preferences”. You will need to enable all 3 sections – CSV Report, then Programatic Access and Cost Allocation Report.
When programmatic access is enabled, you will need to create an S3 bucket to store the CSV files in. AWS will automatically export the files into that bucket.
Click on the “Sample Policy” link next to the bucket name – this will provide the bucket access policy. If you click on the bucket in S3 and choose “Permissions” and then “Add Bucket Policy” – paste the copied policy here. This will allow the AWS billing access to the bucket.
To set which tags appear in the billing CSV – go to the link “Manage Cost Allocation Report”. Use the Included and Excluded tabs to set which tags will be included.
CSV files will appear in the bucket at some point and they will contain the billing report and include the tags added to the instances. The CSV files can now be used to accurately break down your costs.