Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (21 sloc) 1.072 kb
fb4a714 readme
mirkok authored
1 Node-AWS for EC2 and Product Advertising
04abd66 readme
mirkok authored
2 =====
21ac27b readme
mirkok authored
3
fb4a714 readme
mirkok authored
4 A simple [Node.js](http://github.com/ry/node) library to communicate with the Amazon Web Services API.
5
c31692c changed readme
Mirko Kiefer authored
6 It includes specific clients for the EC2 and Product Advertising API but is designed to be easily extendable.
21ac27b readme
mirkok authored
7
c31692c changed readme
Mirko Kiefer authored
8 All responses are parsed to JSON.
9
10 Some simple usage examples:
11
dd1947e changed readme
Mirko Kiefer authored
12 var aws = require("./lib/node-aws");
c31692c changed readme
Mirko Kiefer authored
13
dd1947e changed readme
Mirko Kiefer authored
14 ec2 = aws.createEC2Client(yourAccessKeyId, yourSecretAccessKey);
c31692c changed readme
Mirko Kiefer authored
15
16 ec2.call("DescribeInstances", {}, function(result) {
17 console.log(JSON.stringify(result));
18 })
19
20 Returns you something like:
b158664 changed readme
Mirko Kiefer authored
21 [...]
c31692c changed readme
Mirko Kiefer authored
22 {"item":{"instanceId":"i-acb2d1db","imageId":"ami-03765c77","instanceState":{"code":"80","name":"stopped"},"privateDnsName":{},"dnsName":{},"reason":"User initiated (2010-07-28 19:37:54 GMT)"
b158664 changed readme
Mirko Kiefer authored
23 [...]
c31692c changed readme
Mirko Kiefer authored
24
25 or when using the Product Advertising API:
dd1947e changed readme
Mirko Kiefer authored
26 prodAdv = aws.createProdAdvClient(yourAccessKeyId, yourSecretAccessKey, yourAssociateTag);
c31692c changed readme
Mirko Kiefer authored
27
28 prodAdv.call("ItemSearch", {SearchIndex: "Books", Keywords: "Javascript"}, function(result) {
29 console.log(JSON.stringify(result));
30 })
31
32 Will return you a long list of Books...
Something went wrong with that request. Please try again.