{"_id":"ec2","_rev":"37-3512646884413e1b2b5ced7a242e489b","name":"ec2","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"ec2","version":"0.0.1","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","_id":"ec2@0.0.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.1.tgz","shasum":"14f75d8c606d888b6b202ab8fd484ac5da8da0fc","integrity":"sha512-CZTlzvlesTF3ByajBWp2mj6+7XLfD+Qfvk2TyTnSlUW4ISVhSa3xYyz2SQ4EhPQBZK9GFQKiOfFDgWzJ0JF1Ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJ0QIu8QCNGvtSALpOv41hJj8OBXeV9o818Yh/aHFLrQIgbgCFBlV9i/4GMdPu4Opn7I4bJwda//gZhsk+xSNJPlg="}]}},"0.0.2":{"name":"ec2","version":"0.0.2","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","_id":"ec2@0.0.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.2.tgz","shasum":"629e3b35f507a68b30402947a2cface9e35096e0","integrity":"sha512-RDHrUQK9SmA1sCSgoYM6H6K95mj8PunZsR9CxvMUlOX1pR4TEX4bnHjjEcl1ZW7str7dImGvqgqHJCd2blSeYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsNMQrjPp51EQr1fketvUCMwGtgVO8nVLkv9oHtrihdAiBTfzxTz5Ytw7QwYB03hfn24T/DDqcZMdYRe50etT3f6A=="}]}},"0.0.4":{"name":"ec2","version":"0.0.4","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","dependencies":{"node-xml":">=1.0.0"},"devDependencies":{},"_id":"ec2@0.0.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"a29f399a9cc5c3b3f05e254742f93d1fe23a1ff8","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.4.tgz","integrity":"sha512-l+cTLkE1Xx4NXtxsCGPIxwznP0dhSZYJQw1191fHvjFK7TPAV7T+8DLTbJq5KwdLZ5WTLkxSlpz1xNeHCjWMgw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGps614ff8L1jBVhgbF5Meujs3A53PuumwJFZTj7473SAiEAytp6hE1JNRrl+6dlc1uExP2/7Sl6NJfJ784OgAWsrME="}]},"scripts":{}},"0.0.5":{"name":"ec2","version":"0.0.5","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"devDependencies":{},"_id":"ec2@0.0.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"857ba7bde62058b06c72519dcedc3f2ad03d3be9","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.5.tgz","integrity":"sha512-6U+ucHZcSRBMtyeQLqIDDGzrEJKS+Bavg+ligor4fIhf2YujKbwEwodYanMWiHkL8zuUS+8KffyJw3/SGlq2ew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGZFDY5XSOtGP6gwZ261UBO468DEjGOq+5rTczUPY4pmAiA5kCBRlUA+tXKrWi+6oCBG5fBC/NqAvbvFicfy6WGmzw=="}]},"scripts":{}},"0.0.6":{"name":"ec2","version":"0.0.6","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"devDependencies":{},"_id":"ec2@0.0.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"b53112d8fe5247b3ecee1904cface1eb7255cb02","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.6.tgz","integrity":"sha512-bXN5tUq9HhalhTibNdwnJ6WDvA5+rFNSxG423upI0fWGls8gRe/6uC02C96a4/K7X89yjtweSMkROrmy7awb3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+q1EyqgV8QQW6c9yAFTlubJ/85RoBkFW976RntjaRcAiEAwXqa/xBhEwmKSm91+cpqpUHDnRIlI6oDLmsy5kcZiss="}]},"scripts":{}},"0.0.7":{"name":"ec2","version":"0.0.7","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"_id":"ec2@0.0.7","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.8","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"82996f15ea5488a5ebb4c443a94344648401270c","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.7.tgz","integrity":"sha512-oPMI2B5qeaDYT2SlLkxLBAe/H11Xbjfr1EbsGcgWudDpFQxz8EIebpZRhXZ3b3K4lguXMNUY9o6kGxSgeMv9sQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJYfFh1cPHcVJH8iygD4/oiJ7c/3LZwiwbjnh9PSO5OgIgMBF9c502DAMIBiTeH75DBrCmGjxfQZ+RvmXBHm2As3I="}]},"scripts":{}},"0.0.8":{"name":"ec2","version":"0.0.8","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"_id":"ec2@0.0.8","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.8","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"fab7add7df7c93faa2436a472d9cb772c11f9d8a","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.8.tgz","integrity":"sha512-dObmTi61JcJaF4eaMyoTwjMSjC3gIr5MOiqKZBM+RGejy8IOajTwZEZhuBKgN6gaLR0f0XrYa8zcDVPUvmQJ0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH354J8n1chYGZxt3BE07omlD1bvla/tMNje45bQjFebAiBdF88AfKV94pubUs7B9d0kx/CLMAOgC98lHiadBD94tw=="}]},"scripts":{}},"0.0.9":{"name":"ec2","version":"0.0.9","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"_npmUser":{"name":"bigeasy","email":"alan@prettyrobots.com"},"_id":"ec2@0.0.9","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"9d2d329c35e22ba3f51dfb052a47bbc0e03af6f6","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.9.tgz","integrity":"sha512-y/9DrX58hXWKtUzqMISaktFIHJJ6mtgX76N3Ht10Oyye2kOr1lPjC6YdONnzz2sZfAxItWOZmMXUD1riw1BTDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAG3s6e21rROg5jKCXw/Eo2+AXR4RtkwqcWtXMssLEn2AiBIBhMcDgeo/C1cKQS7cd5y/Mf9zMk4hYlnZVgUUlZI5g=="}]},"maintainers":[{"name":"bigeasy","email":"alan@prettyrobots.com"}]},"0.0.10":{"name":"ec2","version":"0.0.10","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"_npmUser":{"name":"bigeasy","email":"alan@prettyrobots.com"},"_id":"ec2@0.0.10","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"f7cba98922f0f6a50a5923c0acd2abc98398b023","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.10.tgz","integrity":"sha512-3HwnomATMP9eVT2ykD60x4JZisLSa7+A18ZARG0FCEXOElqAYay17J8RIKy+2fw5NyLIHinJTNF6U4Q6sO5qaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnLYiQRuOAEcap89GKPwIFkd7Z0vcje9FclV5eKx3yCgIhAOuEcYbJ1cisAkP4z7LqTcfyWKD/v/W8GvLb5wCBaeVF"}]},"maintainers":[{"name":"bigeasy","email":"alan@prettyrobots.com"}]},"0.0.11":{"name":"ec2","version":"0.0.11","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"_npmUser":{"name":"bigeasy","email":"alan@prettyrobots.com"},"_id":"ec2@0.0.11","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"c055202d863e9bf03ecc04e9b085251ef7a9a482","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.11.tgz","integrity":"sha512-Cbad6n7/+/ZRi582kr/BfKiKUc60aKrd0VpKaEAxdD9Ty5EHd43Hl48t0FP50dJcNSKosYSKM5ox7pmXk8gc7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkicZgTD1dpDntlpRx4xMD1i0L6JKJH03FlvQrgCJunQIhALLJC8Olz+aSMWY9HMxVcv5DZ9C9P2yVPtkZGTgK2tSL"}]},"maintainers":[{"name":"bigeasy","email":"alan@prettyrobots.com"}]},"0.0.12":{"name":"ec2","description":"Amazon AWS minified","keywords":["aws","ec2","amazon"],"version":"0.0.12","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"devDependencies":{"coffee-script":">=1.1.3","ace.is.aces.in.my.book":">=0.0.3"},"lib":"lib","scripts":{"test":"ace t/basics/response.t.coffee"},"engines":{"node":"> 0.6.0"},"_npmUser":{"name":"bigeasy","email":"alan@prettyrobots.com"},"_id":"ec2@0.0.12","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"b8f442bfab711f820c71edd2bef7ee80a5653d9e","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.0.12.tgz","integrity":"sha512-j8beZTTRQ1VlJ0C/6+JbD3MG0SaJYOIQqvng4eGTHp7OXGdsBJDuk6coSxr1OU5gaiu+PC3YDSDzOu7/qtRtBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEy05csq4TqQ/22hVs+qXdPF5mT/E7c3kh+o83p9N0DUAiAUAepax/74SHZBjzFYO7Y9wbkMu+LexSwiElE0EYtHhA=="}]},"readme":"","maintainers":[{"name":"bigeasy","email":"alan@prettyrobots.com"}]},"0.1.0":{"name":"ec2","description":"Amazon AWS minified.","keywords":["aws","ec2","amazon"],"version":"0.1.0","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"devDependencies":{"coffee-script":">=1.1.3","proof":">=0.0.1"},"lib":"lib","scripts":{"test":"proof t/repsonse/error.t"},"engines":{"node":"> 0.6.0"},"_npmUser":{"name":"bigeasy","email":"alan@prettyrobots.com"},"_id":"ec2@0.1.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"274134be65e817dcc408bc37177ff6834c020ee8","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.1.0.tgz","integrity":"sha512-3EcluOUs/I4XGWPn5NFPBsdUwkVajPbqdyBokg8Vh7GiwUHui5ir2JuSf832/z53RXznvujA+ZX0CJGZaaeb+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHtiST/s9VWdXELFBiJ1zpm+VrBhyP42zvtLRMohhxVgIhAKviL+r37mFMC3I0kG88iijhHV9A0x9R8oTcoMfDefWU"}]},"readme":"# Node EC2 [![Build Status](https://secure.travis-ci.org/bigeasy/node-ec2.png?branch=master)](http://travis-ci.org/bigeasy/node-ec2)\n\nEvended Node.js bindings to the EC2 Query API.\n\n * Home: http://bigeasy.github.com/node-ec2\n * Source: http://github.com/bigeasy/node-ec2\n * Documentation: http://github.com/bigeasy/node-ec2/wiki\n\n * Health: http://travis-ci.org/bigeasy/node-ec2\n\n * Discuss: http://groups.google.com/group/nodejs\n * Issues: http://github.com/bigeasy/node-ec2/issues\n\n * License: The MIT License\n\n## Purpose\n\nLaunch Amazon EC2 instances from Node.js and execute callbacks when the\ninstances are available.\n\nnode-ec2 is a minimal Node.js API with absolutely no sugar. node-ec2 signs your\nget requests and converts the XML responses to JSON. Becasue of this, there is a\none to one mapping between the Amazon Query API and the actions provided by\nnode-ec2 and changes to the Amazon Query API are available immediately to\nnode-ec2 applications.\n\nYou can learn more about node-ec2 at the node-ec2 GitHub web page and by reading\nthe wiki.\n\n","maintainers":[{"name":"bigeasy","email":"alan@prettyrobots.com"}]},"0.1.1":{"name":"ec2","description":"Amazon AWS minified.","keywords":["aws","ec2","amazon"],"version":"0.1.1","author":{"name":"Alan Gutierrez"},"directories":{"lib":"./lib"},"main":"./lib/amazon","bin":{"ec2":"./bin/ec2"},"dependencies":{"node-xml":">=1.0.0"},"devDependencies":{"proof":"0.0.8"},"lib":"lib","scripts":{"test":"proof t/*/*.t"},"engines":{"node":"> 0.6.0"},"_npmUser":{"name":"bigeasy","email":"alan@prettyrobots.com"},"_id":"ec2@0.1.1","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.18","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"a606f5343cbdfc7c73f42a712fc067e5c7b8906b","tarball":"https://registry.npmjs.org/ec2/-/ec2-0.1.1.tgz","integrity":"sha512-ctn5tx6X/66NR8zawTT7/k7RWdx1/dG+48Bbd8jeEYEXW1DJj5RoKqtjYg9eyN/9QcTnoWu1VvAKmE0T/8c5/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZ135igCnICzzNuS/2LS1mF6NqP0mUkPuDDT9zUoUc3AiACit3z0ud6UcGfR93eh0gjGkkpn/edWWBp2nsEy4ZoGg=="}]},"readme":"# Node EC2 [![Build Status](https://secure.travis-ci.org/bigeasy/node-ec2.png?branch=master)](http://travis-ci.org/bigeasy/node-ec2)\n\nEvented Node.js bindings to the EC2 Query API.\n\n * **Node EC2** is a minimal Node.js API with a pinch of sugar.\n * **Node EC2** creates a signed request from a AWS EC command name a plain old\nJavaScript object of command parameters.\n * **Node EC2** parses the XML response and converts it into JSON.\n * **Node EC2** does **not** define control flow, so use your favorite control flow\nlibrary.\n * **Node EC2** lets Amazon AWS do all the error checking in one place, then\n   returns the errors as an `Error` to a Node.js style callback.\n\nBecause **Node EC2** is such a thin layer over the Amazon AWS EC2 API you can\nuse the [Amazon API\nReference](http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?query-apis.html)\nto find your way around. Node EC2 calls translate directly to Amazon Query API.\n\n## Synopsis\n\nAn example using\n[RunInstances](http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-RunInstances.html) to launch a 32-bit Fedora 17 instance in Virginia.\n\nOur program reads the AWS secrets from a file named \"~/.aws\" that contains the\nkey and secret as JSON.\n\n```\n{ \"key\": \"EXAMPLE\"\n, \"secret\": \"EXAMPLE\"\n}\n```\n\nOur program launches and instance, then calls `\"DescribeInstances\"` until it is\nready to use. When it's read it prints the TK host name for use with `ssh`.\n\n```javascript\n// Require EC2.\nvar ec2 = require(\"ec2\")\n  , fs = require(\"fs\")\n  , path = require(\"path\")\n  , configuration = path.resolve(process.env.HOME, \".aws\")\n  ;\n\n// Read in the configuration above.\nvar configuration = JSON.parse(fs.readFileSync(configuration, \"utf8\"));\n\n// Create an ec2 function that uses your configuration.\nec2 = ec2(configuration)\n\n// Run an instance and wait for it to become ready.\nec2(\"RunInstances\", {\n  ImageId: \"ami-2d4aa444\", KeyName: \"launch_key\", MinCount: 1, MaxCount: 1\n}, running);\n\n\nvar reservationId, instanceId;\nfunction running (error, response) {\n  if (error) throw error;\n  reservationId = response.reservationId\n  instanceId = response.instancesSet[0].instanceId;\n  describe();\n}\n\nfunction describe () {\n  ec2(\"DescribeInstances\", {}, starting);\n}\n\nfunction starting (error, response) {\n  if (error) throw error;\n  var reservation, instance;\n  reservation = response.reservationSet.filter(function (reservation) {\n    return reservation.reservationId == reservationId;\n  })[0];\n  instance = reservation.instancesSet.filter(function (instance) {\n    return instance.instanceId == instanceId;\n  })[0];\n  if (instance.instanceState.name == \"running\") ready();\n  else setTimeout(describe, 2500);\n}\n\nfunction ready () {\n  console.log(\"Instance created with id: \" + instanceId);\n}\n```\n\nI'm afraid you'll find that working with Amazon AWS is a bit wordy. The XML\ndocuments seem to gravitate toward the longest possible element name that could\npossibly describe the property\n\n## Installing\n\nThe easiest way to install is using npm.\n\n```\nnpm install ec2\n```\n\nYou can also checkout the source code for using `git`. It has only one\ndependency, the wonderful little XML parser `node-xml`.\n\n## Initialization\n\nNode EC2 exports a function you can use to build an EC2 function. You can call\nit directly from `require(\"ec2\")` to build an `ec2` function configured for your\napplication.\n\n```javascript\nvar ec2 = require(\"ec2\")({ key: \"<REDACTED>\", secret: \"<REDACTED>\" });\n\nec2(\"DescribeInstances\", {}, function (error, result) {\n  if (error) throw error;\n  console.log(result)\n});\n```\n\nOptions to the ec2 function are:\n\n * `key` &mdash; Your Amazon AWS key.\n * `secret` &mdash; Your Amazon AWS secret key, which you should always keep\n   secret.\n * `endpoint` &mdash; Either the region identifier or else the fully qualified\n   domain name of the AWS server.\n\nThe region identifiers are one of the following.\n\n * `us-west-2` &mdash; Oregon.\n * `us-west-1` &mdash; California.\n * `us-east-1` &mdash; Virginia.\n * `sa-east-1` &mdash; Sao Paluo.\n * `ap-northeast-1` &mdash; Tokyo.\n * `ap-southeast-1` &mdash; Singapore.\n * `eu-west-1` &mdash; Ireland.\n\nIf you do not specify `endpoint` when you construct your `ec2` function, you can\nspecify it later when you construct your `ec2` function.\n\n## Invocation\n\nInvoke **Node EC2** by passing a command name, command parameters in an object,\nand a callback.\n\n```javascript\nvar ec2 = require(\"ec2\")({ key: \"<REDACTED>\"\n                         , secret: \"<REDACTED>\"\n                         , endpoint: \"us-east-1\"\n                         })\n  , parameters;\n\nparameters =\n{ ImageId: \"ami-2d4aa444\"\n, KeyName: \"launch_key\"\n, MinCount: 1\n, MaxCount: 1\n};\n\nec2(\"RunInstances\", parameters, function (error, result) {\n  if (error) throw error;\n  console.log(result)\n});\n```\n\nYou can override configuration details by passing an options object as the first\nargument to the **Node EC2** function.\n\n```javascript\nvar ec2 = require(\"ec2\")({ key: \"<REDACTED>\"\n                         , secret: \"<REDACTED>\"\n                         , endpoint: \"us-east-1\"\n                         })\n  , parameters;\n\nparameters =\n{ ImageId: \"ami-e269e5d2\"\n, KeyName: \"launch_key\"\n, MinCount: 1\n, MaxCount: 1\n};\n\nec2({ endpoint: \"us-west-2\" }, \"RunInstances\", parameters, function (error, result) {\n  if (error) throw error;\n  console.log(result)\n});\n```\n\nYou can also create a new **Node EC2** function that extends configuration of an\n**Node EC2** function. You can use this to create a base function that holds\nyour credentials, and specific functions for the specific regions.\n\n```javascript\nvar ec2 = require(\"ec2\")({ key: \"<REDACTED>\" , secret: \"<REDACTED>\" })\n  , ec2east = ec2({ endpoint: \"us-east-1\" })\n  , ec2west = ec2({ endpoint: \"us-west-2\" })\n  , parameters\n  ;\n\nparameters =\n{ ImageId: \"ami-e269e5d2\"\n, KeyName: \"launch_key\"\n, MinCount: 1\n, MaxCount: 1\n};\n\nec2east(\"RunInstances\", parameters, function (error, eastern) {\n  if (error) throw error;\n  parameters.ImageId = \"ami-e269e5d2\";\n  ec2west(\"RunInstances\", parameters, function (error, western) {\n    if (error) throw error;\n    console.log(eastern, western);\n  });\n});\n```\n\n## Why So Simple?\n\nAnother implementation might set out to define a library of functions, one for\neach function provided by the AWS EC2 API. This way, you could validate the\ncommand name and parameters before you call.\n\nWe believe that if there's something wrong with your request, you'll find out\nsoon enough. The Amazon AWS server that handles your request will do a bang up\njob of error checking, and it will be able to do all the error checking in one\nplace.\n\nOn the client side, we could validate parameter names, but on the AWS site\nvalidation goes beyond semantics to authorization, service availability, etc.\n\nIf the Amazon AWS EC2 API adds a dozen new features overnight, you don't have to\nwait for a new version of **Node EC2** to use them.\n\nBecause of this, there is a one to one mapping between the Amazon Query API and\nthe actions provided by **Node EC2**. Changes to the Amazon Query API are\navailable immediately to **Node EC2** applications.\n\nYou can learn more about node-ec2 at the node-ec2 GitHub web page and by reading\nthe wiki.\n\n## Command Line Interface\n\n**Node EC2** also comes with a command line interface. The command line\ninterface is very helpful if you want to examine the JSON results of an Amazon\nAWS EC2 API call.\n\nThe `ec2` program will look for a configuration file at `~/.aws` or else use the\nvalue of the `AWS_CONFIG` environment variable as the path to the configuration\nfile. The configuration file is the JSON file used to create a **Node EC2**\nfunction described above. It contains your key, secret key and the service\nendpoint.\n\n```\n$ ec2 DescribeKeyPairs\n{\n  \"requestId\": \"1d42624e-a3c8-4dca-8d42-6ac0a11f4468\",\n  \"keySet\": [\n    {\n      \"keyName\": \"automation_key\",\n      \"keyFingerprint\": \"82:a4:69:ca:89:31:8f:58:75:ae:24:eb:e5:71:78:56:32:09:3a:24\"\n    },\n    {\n      \"keyName\": \"temporary_key\",\n      \"keyFingerprint\": \"c0:14:ff:06:23:dd:52:6a:4d:29:e9:0f:1f:54:13:73:e1:c8:fd:90\"\n    },\n    {\n      \"keyName\": \"launch_key\",\n      \"keyFingerprint\": \"8c:cf:71:0d:84:05:19:cd:7d:89:ca:62:7e:8f:51:0b:16:df:f4:c0\"\n    }\n  ]\n}\n```\n\nInvocation is first the command name, then command arguments just as they appear\nin the Amazon AWS API. Note that some arguments in the API require a number\nappended to the argument name.\n\n```\n$ ec2 RunInstances ImageId ami-08d97e61 KeyName launch_key MinCount 1 MaxCount 1\n{\n  \"requestId\": \"7aa586a5-c658-4735-9152-72ad20cb3282\",\n  \"reservationId\": \"r-de7200bb\",\n  \"ownerId\": \"341264201128\",\n  \"groupSet\": [\n    {\n      \"groupId\": \"sg-c8f72da7\",\n      \"groupName\": \"default\"\n    }\n  ],\n  \"instancesSet\": [\n    {\n      \"instanceId\": \"i-2af0e253\",\n      \"imageId\": \"ami-08d97e61\",\n      \"instanceState\": {\n        \"code\": \"0\",\n        \"name\": \"pending\"\n      },\n      \"privateDnsName\": null,\n      \"dnsName\": null,\n      \"reason\": null,\n      \"keyName\": \"launch_key\",\n      \"amiLaunchIndex\": \"0\",\n      \"productCodes\": null,\n      \"instanceType\": \"m1.small\",\n      \"launchTime\": \"2012-06-28T18:29:55.000Z\",\n      \"placement\": {\n        \"availabilityZone\": \"us-east-1a\",\n        \"groupName\": null,\n        \"tenancy\": \"default\"\n      },\n      \"kernelId\": \"aki-407d9529\",\n      \"monitoring\": {\n        \"state\": \"disabled\"\n      },\n      \"groupSet\": [\n        {\n          \"groupId\": \"sg-c8f72da7\",\n          \"groupName\": \"default\"\n        }\n      ],\n      \"stateReason\": {\n        \"code\": \"pending\",\n        \"message\": \"pending\"\n      },\n      \"architecture\": \"i386\",\n      \"rootDeviceType\": \"ebs\",\n      \"rootDeviceName\": \"/dev/sda1\",\n      \"blockDeviceMapping\": null,\n      \"virtualizationType\": \"paravirtual\",\n      \"clientToken\": null,\n      \"hypervisor\": \"xen\"\n    }\n  ]\n}\n```\n\n## Change Log\n\nChanges for each release since 0.1.1.\n\n### Version 0.1.1 &mdash; Thu Jun 28 22:08:28 UTC 2012\n\n * Publish a version without junk directories that defeat NPM. #9. #23.\n * Create change log. #13.\n * Specify fully qualified hostname for endpoint. #25. #3\n * Rewrite `README.md` to describe one function API.\n * Delete `Cakefile`. #16.\n * Convert to JavaScript. #10.\n\nVersions prior to 0.1.1 were not tracked very well in `git`. My fault, but I'm\nnot feeling the guilt necessary to perform the `git` forensics necessary to\nreconstruct a change log.\n","maintainers":[{"name":"bigeasy","email":"alan@prettyrobots.com"}]}},"maintainers":[{"name":"bigeasy","email":"alan@prettyrobots.com"}],"author":{"name":"Alan Gutierrez"},"time":{"modified":"2022-06-16T04:30:12.478Z","created":"2011-05-12T04:07:39.602Z","0.0.1":"2011-05-12T04:07:39.602Z","0.0.2":"2011-05-12T04:07:39.602Z","0.0.4":"2011-05-12T04:07:39.602Z","0.0.5":"2011-05-12T04:12:25.365Z","0.0.6":"2011-05-28T07:02:11.034Z","0.0.7":"2011-06-01T08:35:49.712Z","0.0.8":"2011-06-02T07:44:34.128Z","0.0.9":"2011-12-13T10:01:28.200Z","0.0.10":"2011-12-13T14:48:26.963Z","0.0.11":"2011-12-13T14:54:32.420Z","0.0.12":"2012-03-07T15:10:24.259Z","0.1.0":"2012-03-21T07:07:44.315Z","0.1.1":"2012-06-28T22:10:47.718Z"},"description":"Amazon AWS minified."}