-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Alan Gutierrez edited this page Nov 1, 2010
·
6 revisions
Welcome to the node-ec2 wiki!
- Jeremy Ashkenas ~ Code reviews, instant CoffeeScript feedback, rewrites of Gists into idomatic CoffeeScript, and the like.
- Peteris Krumins ~ Code reads and bug fixes.
Prior Art
- amazon-ec2 ~ The Ruby implementation of the Amazon Query API bindings mainted by Glenn Rempe inspired the minimal API approach.
Because node-ec2
is a thin layer over the Amazon Query API, you can use the
Amazon API Reference
to find your way around. Here's an example using
RunInstances.
var request = ec2.request(
{ key: process.env["AWS_ACCESS_KEY_ID"]
, secret: process.env["AWS_SECRET_ACCESS_KEY"]
});
var instanceId;
request.call("RunInstances", { ImageId: "ami-2d4aa444", KeyName: "launch_key" }, function (response) {
instanceId = response.instancesSet[0].instanceId;
});
request.execute();
As you can see, you simply pass the hash object of the name value pairs as they are documented in the Amazon EC2 API page for