Teevity / ice

AWS Usage Tool
2.86k stars 435 forks source link

limit processing/display of AWS account information #251

Open screechdiesel opened 7 years ago

screechdiesel commented 7 years ago

Hello. My raw billing file contains data for 36 AWS accounts used by my corporation. But I only want my specific ICE implementation to process/display the data for 2 of those accounts.

Know of a method to limit the data that ICE processes based on account number? Thank you kindly!

ghaber commented 7 years ago

Hi,

If you are talking about displaying, you can filter and select those two accounts in ICE and only those data will be shown.

If you want to avoid processing, the only way I see is preprocessing the csv files after you receive them from lambda. You use a bucket to receive the files and launch a lambda function with an S3 put event so the function will be called everytime a file is received ( according with my experience is twice per day)

This lambda will unzip the csv, read line by line and copy the lines with the linked accounts you want to process to a file with the same name in /tmp, zip the file and save it to another bucket that is the one ICE will see.

I have a lambda that makes something very similar it extract the lines from the csv of one account, but modifying should be easy.

Regards