Module for managing machines that are backed by aws instances, and are stored as MongoDB entries for custom per-instance information.
npm install e-conomic/aws-machine-manager.js
Example of spawning a machine, printing information about its instance, and terminating it:
var AMM = require("./")
var amm = new AMM({
key: "***",
secret: "***"
})
amm.spawn({name: "foo"})
.then(function (machine) {
console.log("id:", machine.instanceId)
return machine.getInst()
})
.then(function (instance) {
console.log("instance details:", instance)
})
.then(function () {
return amm.terminate("foo")
})
.done()
If you rely on this package and want to test against its behavior use the mocked-aws-machine-manager package to pass around fake data.