Here is a quick and dirty script I wrote to total some AWS costs for a client. 
You might find it helpful to play around with. I copied it from the aws-billing 
module. I had to update some of the process since AWS has dropped their prices 
since aws-billing was written. Anyway, if I get a chance I'll update some more 
stuff with it, but you can kind of see how the AWS SDK works.

To use it you would do something like this:

npm install aws-sdk

AWS_ACCESS_KEY_ID=AKIA... (put your key here) AWS_SECRET_ACCESS_KEY=(put your 
secret access key here) node index.js

In other words, aws-sdk looks for the key in the environment variable. You can 
specify on the Cubans line but be careful about security. You may want to 
delete the key from your command line history if you are on a Linux box.



https://github.com/alexwoehr/node-aws-ec2costs/blob/master/aws-billing-totals

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/92ef6953-3e19-43e7-bec1-42b7dfcffc66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to