Skip to content

Instantly share code, notes, and snippets.

@toshihirock
Created October 8, 2015 22:49
Show Gist options
  • Save toshihirock/9c4bd414350589d21441 to your computer and use it in GitHub Desktop.
Save toshihirock/9c4bd414350589d21441 to your computer and use it in GitHub Desktop.
// Load the SDK and UUID
var AWS = require('aws-sdk');
AWS.config.update({region: 'ap-northeast-1'})
// Create an S3 client
//var s3 = new AWS.S3();
var ec2 = new AWS.EC2();
ec2.describeInstances({}, function(err, data) {
if (err) console.log(err, err.stack);
else {
console.log(data);
data.Reservations.forEach(function(reservation) {
console.log(reservation);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment