{"_id":"aws-cfn-custom-resource","_rev":"65-22e7e0013b5efacebfc6656461254c56","name":"aws-cfn-custom-resource","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"aws-cfn-custom-resource","version":"1.0.0","keywords":["aws","amazon","cloudformation"],"author":{"url":"http://www.bazaarvoice.com/","name":"Bazaarvoice"},"license":"MIT","_id":"aws-cfn-custom-resource@1.0.0","maintainers":[{"name":"dump247","email":"cthomas7577@gmail.com"}],"contributors":[{"name":"Cory Thomas","email":"cory.thomas@bazaarvoice.com"}],"homepage":"https://github.com/bazaarvoice/aws-cfn-custom-resource","bugs":{"url":"https://github.com/bazaarvoice/aws-cfn-custom-resource/issues"},"dist":{"shasum":"440e90d67f131f6214559ea61a1030f13000c2c3","tarball":"https://registry.npmjs.org/aws-cfn-custom-resource/-/aws-cfn-custom-resource-1.0.0.tgz","integrity":"sha512-sV0Tv2P2wqafTENAKaREU16Qg0F5llkqjm+0eJq8RWTPZ7kMCPRY87z8IiX9DA00MzGcwmI8pLmFLRivU8UXng==","signatures":[{"sig":"MEUCIQCaKFs8O0gwlPlwZyXmE2shbZ8ZqbH7lwuftyCgyWQMFgIgDQg9FKLcO8oqTNURPK5OxFT20FP5EHld+2NZoLBzUCM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/resource.js","_from":".","_shasum":"440e90d67f131f6214559ea61a1030f13000c2c3","engines":{"node":">= 0.8.0"},"gitHead":"2efc8e9c6d9ede5b3805c4f5da7e685949785a4a","scripts":{"test":"grunt"},"_npmUser":{"name":"dump247","email":"cthomas7577@gmail.com"},"repository":{"url":"git://github.com/bazaarvoice/aws-cfn-custom-resource.git","type":"git"},"_npmVersion":"2.14.2","description":"Library to help write AWS CloudFormation custom resources.","directories":{"lib":"lib"},"_nodeVersion":"0.12.7","dependencies":{"q":"^1.4.1","bunyan":"^1.5.1","lodash":"^3.10.1","aws-sdk":"^2.1.50","randomstring":"^1.1.0"},"devDependencies":{"grunt":"^0.4.5","proxyquire":"^1.7.2","gruntify-eslint":"^1.0.1","grunt-contrib-nodeunit":"^0.4.1"}},"1.0.1":{"name":"aws-cfn-custom-resource","version":"1.0.1","keywords":["aws","amazon","cloudformation"],"author":{"url":"http://www.bazaarvoice.com/","name":"Bazaarvoice"},"license":"Apache-2.0","_id":"aws-cfn-custom-resource@1.0.1","maintainers":[{"name":"bazaarvoice","email":"open-source@bazaarvoice.com"},{"name":"dump247","email":"cthomas7577@gmail.com"}],"contributors":[{"name":"Cory Thomas","email":"cory.thomas@bazaarvoice.com"}],"homepage":"https://github.com/bazaarvoice/aws-cfn-custom-resource","bugs":{"url":"https://github.com/bazaarvoice/aws-cfn-custom-resource/issues"},"dist":{"shasum":"0ce4a3de5ffe426b6a34d79e24748531007c7224","tarball":"https://registry.npmjs.org/aws-cfn-custom-resource/-/aws-cfn-custom-resource-1.0.1.tgz","integrity":"sha512-T9MCcUOHlcoShAlrOlFnWRzf0hnnkGsFj4qc4ChIuEsHxkoAFOyLO11M3qGR5b/JU+7hWRUe1HYwsdAWnF3njA==","signatures":[{"sig":"MEYCIQDFI8PQ86XS+xBIpUl3sDtiYf//U8Lj5RfRMjPb6pHCnQIhAJHzMmuJOgr0fajHxQ1PnuwliFIyY3fERBIOKvvF9wib","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/resource.js","_from":".","_shasum":"0ce4a3de5ffe426b6a34d79e24748531007c7224","engines":{"node":">= 0.8.0"},"gitHead":"1806163df80e12395881f3e58523dadf7cff0d8a","scripts":{"test":"grunt"},"_npmUser":{"name":"dump247","email":"cthomas7577@gmail.com"},"repository":{"url":"git://github.com/bazaarvoice/aws-cfn-custom-resource.git","type":"git"},"_npmVersion":"2.14.2","description":"Library to help write AWS CloudFormation custom resources.","directories":{"lib":"lib"},"_nodeVersion":"0.12.7","dependencies":{"q":"^1.4.1","bunyan":"^1.5.1","lodash":"^3.10.1","aws-sdk":"^2.1.50","randomstring":"^1.1.0"},"devDependencies":{"grunt":"^0.4.5","proxyquire":"^1.7.2","gruntify-eslint":"^1.0.1","grunt-contrib-nodeunit":"^0.4.1"}},"2.0.0":{"name":"aws-cfn-custom-resource","version":"2.0.0","keywords":["aws","amazon","cloudformation"],"author":{"url":"http://www.bazaarvoice.com/","name":"Bazaarvoice"},"license":"Apache-2.0","_id":"aws-cfn-custom-resource@2.0.0","maintainers":[{"name":"bazaarvoice","email":"open-source@bazaarvoice.com"},{"name":"dump247","email":"cthomas7577@gmail.com"}],"contributors":[{"name":"Cory Thomas","email":"cory.thomas@bazaarvoice.com"}],"homepage":"https://github.com/bazaarvoice/aws-cfn-custom-resource","bugs":{"url":"https://github.com/bazaarvoice/aws-cfn-custom-resource/issues"},"dist":{"shasum":"98e80c2a37180a005e8d70ba77f224e7e012dd6f","tarball":"https://registry.npmjs.org/aws-cfn-custom-resource/-/aws-cfn-custom-resource-2.0.0.tgz","integrity":"sha512-Fr5SfV0HyUfl6i0xbHQoLuD12Hm548tDnmOW3qyCnoyQm3q01AUKBelrDHNIziJscC8V3JNLMiCuhbn3VqncwA==","signatures":[{"sig":"MEUCIQCMz5Ynjo0kMgYqM/LNovOqm9yjcflc8NWpKV2HrLJLxAIgRM5LcOraKLuZqdkkyvWIx2JxYv2R1+sZ51X8DEfAOZg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/resource.js","_from":".","_shasum":"98e80c2a37180a005e8d70ba77f224e7e012dd6f","engines":{"node":">= 0.8.0"},"gitHead":"8f77f594dc8c02cdea81b301b0f579b0545dc6c7","scripts":{"test":"grunt"},"_npmUser":{"name":"dump247","email":"cthomas7577@gmail.com"},"repository":{"url":"git://github.com/bazaarvoice/aws-cfn-custom-resource.git","type":"git"},"_npmVersion":"2.14.2","description":"Library to help write AWS CloudFormation custom resources.","directories":{"lib":"lib"},"_nodeVersion":"0.12.7","dependencies":{"q":"^1.4.1","bunyan":"^1.5.1","lodash":"^3.10.1","aws-sdk":"^2.1.50","randomstring":"^1.1.0"},"devDependencies":{"grunt":"^0.4.5","proxyquire":"^1.7.2","gruntify-eslint":"^1.0.1","grunt-contrib-nodeunit":"^0.4.1"}},"2.0.1":{"name":"aws-cfn-custom-resource","version":"2.0.1","keywords":["aws","amazon","cloudformation"],"author":{"url":"http://www.bazaarvoice.com/","name":"Bazaarvoice"},"license":"Apache-2.0","_id":"aws-cfn-custom-resource@2.0.1","maintainers":[{"name":"bazaarvoice","email":"open-source@bazaarvoice.com"},{"name":"dump247","email":"cthomas7577@gmail.com"}],"contributors":[{"name":"Cory Thomas","email":"cory.thomas@bazaarvoice.com"}],"homepage":"https://github.com/bazaarvoice/aws-cfn-custom-resource","bugs":{"url":"https://github.com/bazaarvoice/aws-cfn-custom-resource/issues"},"dist":{"shasum":"799836b61b910f0e4346a2f6a1c23ca375e23f97","tarball":"https://registry.npmjs.org/aws-cfn-custom-resource/-/aws-cfn-custom-resource-2.0.1.tgz","integrity":"sha512-mz3fkBSRlHGPTB48n1IFt9RZff4t4ieUDFSiFyKz6VTFoAY2KQujutxs0GSusC0RITMf/QlQlSTm659PNF46Lg==","signatures":[{"sig":"MEQCIGRADQLctgvqitrC3DQgxM+6k+WHc6FO9XCF59QIKoyrAiA8iERMdn/UFt9BZd+Yx/uSRn0sOgxEpgNo6vepTJWL9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/resource.js","_from":".","_shasum":"799836b61b910f0e4346a2f6a1c23ca375e23f97","engines":{"node":">= 0.8.0"},"gitHead":"98bb66aac92dcc32853874b65b4439e86169c46a","scripts":{"test":"grunt"},"_npmUser":{"name":"dump247","email":"cthomas7577@gmail.com"},"repository":{"url":"git://github.com/bazaarvoice/aws-cfn-custom-resource.git","type":"git"},"_npmVersion":"3.3.12","description":"Library to help write AWS CloudFormation custom resources.","directories":{"lib":"lib"},"_nodeVersion":"5.2.0","dependencies":{"q":"^1.4.1","bunyan":"^1.5.1","lodash":"^3.10.1","aws-sdk":"^2.1.50","randomstring":"^1.1.0"},"devDependencies":{"grunt":"^0.4.5","proxyquire":"^1.7.2","gruntify-eslint":"^1.0.1","grunt-contrib-nodeunit":"^0.4.1"}}},"time":{"created":"2015-09-21T16:19:31.205Z","modified":"2026-09-20T13:00:58.233Z","1.0.0":"2015-09-21T16:19:31.205Z","1.0.1":"2015-09-21T20:29:10.358Z","2.0.0":"2015-10-06T14:36:09.295Z","2.0.1":"2015-12-16T20:57:56.737Z"},"bugs":{"url":"https://github.com/bazaarvoice/aws-cfn-custom-resource/issues"},"author":{"url":"http://www.bazaarvoice.com/","name":"Bazaarvoice"},"license":"Apache-2.0","homepage":"https://github.com/bazaarvoice/aws-cfn-custom-resource","keywords":["aws","amazon","cloudformation"],"repository":{"url":"git://github.com/bazaarvoice/aws-cfn-custom-resource.git","type":"git"},"description":"Library to help write AWS CloudFormation custom resources.","contributors":[{"name":"Cory Thomas","email":"cory.thomas@bazaarvoice.com"}],"maintainers":[{"email":"engineering-admin-npm@bazaarvoice.com","name":"engineering-admin-npm"},{"email":"varsha.adiga@bazaarvoice.com","name":"varsha.adigabv"},{"email":"anish.prabhu@bazaarvoice.com","name":"anish_bvoice"},{"email":"soumen.saniel@bazaarvoice.com","name":"soumen-saniel"},{"email":"Nandeesh.Shivanandan@bazaarvoice.com","name":"nandeesh-hs"},{"email":"nirmalya.roy@bazaarvoice.com","name":"nroy"},{"email":"nithin.jayaram@bazaarvoice.com","name":"njayaram"},{"email":"daniel.hamilton@bazaarvoice.com","name":"danielhamilton-bv"},{"email":"alan.lapthorn@bazaarvoice.com","name":"alanlapthorn-bv"},{"email":"ksu_dp@ua.fm","name":"ksu_dp"},{"email":"edward.davies@bazaarvoice.com","name":"edwarddavies-bv"},{"email":"sindhu.srinivasan@bazaarvoice.com","name":"sindhusrinivasan-bv"},{"email":"shankar.samidala@bazaarvoice.com","name":"shankarsamidala-bv"},{"email":"amal.kuriakose@bazaarvoice.com","name":"amalkuriakose-bv"},{"email":"shane.ohanlon@bazaarvoice.com","name":"sohanlon-bv"},{"email":"nidheesh.c@bazaarvoice.com","name":"nc008-bv"},{"email":"murali.purushothaman@bazaarvoice.com","name":"murali.purushothaman-bv"},{"email":"vinayaka.arashanagi@bazaarvoice.com","name":"vinay-bv"},{"email":"ramakrishna.arishinaguppi@bazaarvoice.com","name":"rarishinaguppi-bv"},{"email":"arjun.krishna@bazaarvoice.com","name":"arjunkrishna-bv"},{"email":"madhusudana.onteddu@bazaarvoice.com","name":"madhusudana"},{"email":"charlie.tizzard@bazaarvoice.com","name":"charlietizzard-bv"},{"email":"gautamraj.kumawat@bazaarvoice.com","name":"gkumawat-bv"},{"email":"shruti.singhania@bazaarvoice.com","name":"ssinghania-bv"}],"readme":"# CloudFormation Custom Resource\n\nA node.js library to help write CloudFormation custom resources.\n\n# Usage\n\n## Install\n\nInstall the module: `npm install aws-cfn-custom-resource --save`\n\nImport the module: `var resource = require('aws-cfn-custom-resource');`\n\n## Handler\n\nCreate a module for the main custom resource handler. This handler maps custom\nresource type names to modules that process the events for that resource. This\nis the handler that is provided to the lambda function that executes the custom\nresource.\n\n### Example\n\n`resource.js`\n\n```javascript\nvar resource = require('aws-cfn-custom-resource');\n\nexports.handler = resource.handler({\n  'Custom::MyCustomResource': function () { return require('./lib/my-custom-resource'); }\n});\n```\n\n## Resource Module\n\nImplement request handlers for a custom resource type.\n\nThe resource module must export three functions:\n\n* handleDelete\n* handleCreate\n* handleUpdate\n\n### Input\n\nThe single parameter to a handler is a `CloudFormationEvent`.\n\nThe event includes all the properties from a [custom resource request](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requests.html),\nplus some additional information detailed below.\n\n<dl>\n    <dt>stack.region</dt>\n    <dd>\n    <p>AWS region the stack that created the resource is located in.</p>\n    </dd>\n\n    <dt>stack.accountId</dt>\n    <dd>\n    <p>ID of the AWS account the stack that created the resource is located in.</p>\n    </dd>\n\n    <dt>stack.name</dt>\n    <dd>\n    <p>Name of the CloudFormation stack that the resource is a part of.</p>\n    </dd>\n\n    <dt>stack.arn</dt>\n    <dd>\n    <p>Full ARN of the CloudFormation stack that the resource is a part of. Alias for <em>StackId</em>.</p>\n    </dd>\n</dl>\n\n### Output\n\nA handler should return one of the following:\n\n* undefined/null to indicate success\n* an object with keys:\n  * `physicalResourceId` - _optional_ - Identifier unique to the custom resource\n    vendor. If not provided, a resource id is generated.\n  * `data` - _optional_ - Custom resource provider-defined name-value pairs to send\n    with the response. The values provided here can be accessed by name in\n    the template with <a href=\"http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html\">Fn::GetAtt</a>.\n* a promise that results in one of the above values\n\nA handler may also throw an error to indicate failure.\n\n### AWS API\n\nThis library provides a helper for the AWS JavaScript SDK that converts SDK\nfunctions from callback to promises.\nThe helper can make it easier to stub/mock AWS APIs in unit tests.\n\n```javascript\nvar resource = require('aws-cfn-custom-resource');\n\nexports.handleCreate = function (event) {\n  var session = new resource.aws.Session();\n  var ec2 = session.client('EC2');\n\n  return ec2.describeInstances({InstanceIds: ['i-234232']})\n  .then(function (result) {\n    // do something magical\n  });\n};\n```\n\n### Example\n\n`lib/my-custom-resource.js`\n\n```javascript\nexports.handleDelete = function (event) {\n  // Return nothing and the custom resource responds with success.\n  // Can also:\n  //   throw new Error(\"some message\");\n  //   -- or\n  //   var resource = require('aws-cfn-custom-resource');\n  //   throw resource.newError(\"MyException\", \"some message\");\n  //   -- or\n  //   return {physicalResourceId: \"myResource\"};\n\n  // You can also do the following:\n  //   throw \"some message\";\n  // However, you will not get a stack trace in this case. It is recommended\n  // to throw Error instead.\n};\n\nexports.handleUpdate = function (event) {\n  // Async handlers should respond with a promise.\n  var Q = require('q');\n  var deferred = Q.defer();\n\n  doSomethingAsync(function (err, result) {\n    if (err) {\n      deferred.reject(err);\n    } else {\n      deferred.resolve({\n        physicalResourceId: 'SomeResourceId',\n        data: {\n          key1: \"Value\",\n          key2: \"Value2\"\n        }\n      });\n    }\n  });\n\n  return deferred.promise();\n};\n\n// Sometimes it makes sense to use the same implementation for create & update.\nexports.handleCreate = exports.handleUpdate;\n```\n","readmeFilename":"README.md","users":{"autarchprinceps":true}}