{"_id":"@aerisweather/deploy-cloud-formation","_rev":"18-e3fd6be0fa151a9500cb2e43a33a36d2","name":"@aerisweather/deploy-cloud-formation","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@aerisweather/deploy-cloud-formation","version":"1.0.0","keywords":["AWS","CloudFormation"],"author":{"name":"Edan Schwartz","email":"eschwartz@aerisweather.com"},"license":"MIT","_id":"@aerisweather/deploy-cloud-formation@1.0.0","maintainers":[{"name":"eschwartz","email":"edanschwartz@gmail.com"}],"dist":{"shasum":"de60da64bc74750764e21ab0ca961100a50a1fe9","tarball":"https://registry.npmjs.org/@aerisweather/deploy-cloud-formation/-/deploy-cloud-formation-1.0.0.tgz","integrity":"sha512-P9aGbG4MMWUqiLLN6gZvt2tmGW5Z2Yl3htTZh8W3/AKNOwvtt45q28GXlx5Za6q7YXLBgTzGN4rEsLnJ+83jjw==","signatures":[{"sig":"MEYCIQCVfejCgSjmjHZ1iQNoBXVRu7rhyMujHOd9vdoL42NDnAIhAKQ4zUcUra89sEoPoiMDN2YIxKaOn7mKyXI+4SdBZjYv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/lib/main.js","_from":".","types":"dist/lib/main.d.ts","_shasum":"de60da64bc74750764e21ab0ca961100a50a1fe9","gitHead":"0a096c0d17452ba0722cf85f1d1643f41f8c7594","scripts":{"build":"tsc","prepublish":"tsc"},"_npmUser":{"name":"eschwartz","email":"edanschwartz@gmail.com"},"_npmVersion":"4.0.5","description":"Easily deploy and update CloudFormation templates","directories":{},"_nodeVersion":"6.9.1","dependencies":{"lodash":"^4.17.4","aws-sdk":"^2.7.27","typescript":"^2.1.5","@types/node":"^7.0.3","@types/lodash":"^4.14.50","@types/aws-sdk":"0.0.42"},"_npmOperationalInternal":{"tmp":"tmp/deploy-cloud-formation-1.0.0.tgz_1485211241917_0.125714257825166","host":"packages-18-east.internal.npmjs.com"}},"1.1.0":{"name":"@aerisweather/deploy-cloud-formation","version":"1.1.0","keywords":["AWS","CloudFormation"],"author":{"name":"Edan Schwartz","email":"eschwartz@aerisweather.com"},"license":"MIT","_id":"@aerisweather/deploy-cloud-formation@1.1.0","maintainers":[{"name":"eschwartz","email":"edanschwartz@gmail.com"},{"name":"four43","email":"seth@four43.com"},{"name":"lhuffmam","email":"lhuffman@aerisweather.com"}],"bin":{"deploy-cloud-formation":"./bin/cli.js"},"dist":{"shasum":"fecd6e5391477da7b052d712dcd207cdb576c80d","tarball":"https://registry.npmjs.org/@aerisweather/deploy-cloud-formation/-/deploy-cloud-formation-1.1.0.tgz","integrity":"sha512-5cLnQafcod0/Zyi2R7fYjPopSTD8H2EHp639nawCWa3gvHA8/4Wpb2sjUrFSj7Q8osblsb26GZwUjrKUdNrcIA==","signatures":[{"sig":"MEQCIFOt5qhP8bXz0UmZy82KyA9Eg6rnw0ex80eDHwN4kj+eAiBRGcnRX6wK6GNv5ADv4kO5V+0A0b8sf9d/d0cHiGzYVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/main.js","_from":".","types":"dist/main.d.ts","_shasum":"fecd6e5391477da7b052d712dcd207cdb576c80d","gitHead":"2333723fb1e6e051a52aef57a82c865bdc140035","scripts":{"build":"tsc","prepublish":"tsc"},"_npmUser":{"name":"eschwartz","email":"edanschwartz@gmail.com"},"_npmVersion":"4.0.5","description":"Easily deploy and update CloudFormation templates","directories":{},"_nodeVersion":"6.9.1","dependencies":{"lodash":"^4.17.4","aws-sdk":"^2.7.27","typescript":"^2.1.5","@types/node":"^7.0.3","admiral-cli":"^0.12.0","@types/lodash":"^4.14.50","@types/aws-sdk":"0.0.42"},"_npmOperationalInternal":{"tmp":"tmp/deploy-cloud-formation-1.1.0.tgz_1485278258369_0.4018225143663585","host":"packages-12-west.internal.npmjs.com"}},"1.2.0":{"name":"@aerisweather/deploy-cloud-formation","version":"1.2.0","keywords":["AWS","CloudFormation"],"author":{"name":"Edan Schwartz","email":"eschwartz@aerisweather.com"},"license":"MIT","_id":"@aerisweather/deploy-cloud-formation@1.2.0","maintainers":[{"name":"four43","email":"seth@four43.com"},{"name":"eschwartz","email":"edanschwartz@gmail.com"},{"name":"lhuffmam","email":"lhuffman@aerisweather.com"}],"bin":{"deploy-cloud-formation":"./bin/cli.js"},"dist":{"shasum":"7eb4475093ae42df937981a0b0dacb7e529473e8","tarball":"https://registry.npmjs.org/@aerisweather/deploy-cloud-formation/-/deploy-cloud-formation-1.2.0.tgz","integrity":"sha512-SpD/uvtOf+y3pXPtXyqaDK1dBINXXyzlZ2LvxRPF3RB9lpf5jbE+sET8eIwZ6tGjj8f5IvIjbGKm/qImgxJLYA==","signatures":[{"sig":"MEYCIQDEVxVp9Am58hMie2+3PeX8Sz3A3XI30QCPeNY0JEsu5wIhAK4L2+y8BAxt0UT/iSKlYV2qoMgX2kfeTk0W2oKYo5kv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/main.js","_from":".","types":"dist/main.d.ts","_shasum":"7eb4475093ae42df937981a0b0dacb7e529473e8","gitHead":"61c0c91ebde4c2171d11415fe240072730582c0f","scripts":{"build":"tsc","prepublish":"tsc"},"_npmUser":{"name":"eschwartz","email":"edanschwartz@gmail.com"},"_npmVersion":"3.10.10","description":"Easily deploy and update CloudFormation templates","directories":{},"_nodeVersion":"6.9.1","dependencies":{"lodash":"^4.17.4","aws-sdk":"^2.7.27","typescript":"^2.1.5","@types/node":"^7.0.3","admiral-cli":"^0.12.0","@types/lodash":"^4.14.50","@types/aws-sdk":"0.0.42"},"_npmOperationalInternal":{"tmp":"tmp/deploy-cloud-formation-1.2.0.tgz_1501271781359_0.8786560704465955","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-01-23T22:40:42.588Z","modified":"2026-06-18T21:56:55.812Z","1.0.0":"2017-01-23T22:40:42.588Z","1.1.0":"2017-01-24T17:17:40.219Z","1.2.0":"2017-07-28T19:56:22.263Z"},"author":{"name":"Edan Schwartz","email":"eschwartz@aerisweather.com"},"license":"MIT","keywords":["AWS","CloudFormation"],"description":"Easily deploy and update CloudFormation templates","maintainers":[{"email":"nshipes@urban10.com","name":"u10int"},{"email":"bennyc50@gmail.com","name":"bennyc50"},{"email":"lhuffman@aerisweather.com","name":"lhuffmam"},{"email":"seth@four43.com","name":"four43"},{"email":"eschwartz@aerisweather.com","name":"aerisweather-ci"},{"email":"noahblon@gmail.com","name":"noahblon"},{"email":"devops@aerisweather.com","name":"xweather-ci"},{"email":"oliver.alexander@aerisweather.com","name":"oliver.alexander.aw"},{"email":"alexander.stone@vaisala.com","name":"xander-vaisala"}],"readme":"# deploy-cloud-formation\n\nEasily deploy and update CloudFormation templates\n\n## What does it do?\n\nWhen you pass a template to `deployCloudFormation`:\n- It creates a CloudFormation stack, if one doesn't exist\n- It executes a ChangeSet against a stack, if the stack already exists\n- Waits to resolve until the stack is fully created/updated\n- Throws an error if the stack fails to create/update\n\nSo nothing too fancy. But it turns out that this is kind of tricky using the AWS SDK alone.\n\n## Install\n\n```\nnpm install --save-dev @aerisweather/deploy-cloud-formation\n```\n\n## Usage\n\n### with the CLI tool\n\nThe simplest way to deploy a CloudFormation template is using the CLI tool:\n\n```\nnode_modules/.bin/deploy-cloud-formation \\\n  --template ./my-cloud-formation-template.json \\\n  --stackName MyStack \\\n  --region us-east-1\n```\n\n### with the node module\n\n```typescript\nconst deployCloudFormation = require('@aerisweather/deploy-cloud-formation').default;\n\nconst template = {\n  \"Resources\": {\n      \"EC2Instance\": {\n        \"Type\": \"AWS::EC2::Instance\",\n        \"Properties\": {\n          // ...\n        }\n      },\n      \"InstanceSecurityGroup\": {\n        \"Type\": \"AWS::EC2::SecurityGroup\",\n        \"Properties\": {\n          // ...\n        }\n      }\n    }\n}\n\ndeployCloudFormation({\n  region: 'us-east-1',\n  template: JSON.stringify(template),\n  stackName: 'my-cloudformation-stack'\n})\n  .then(\n    () => console.log(`Done!`),\n    (err) => console.error(`Failed to create a CloudFormation stack: ${err.message}`)\n  );\n```\n\n## Template Utilities\n\nTo make writing JSON templates a little nicer, we provide you with some utility functions:\n\n```typescript\nimport {Join, AccountId, Attr, Ref} from '@aeriweather/deploy-cloud-formation';\n\nconst template = {\n  Resources: {\n    //...\n    SomeRole: {\n      Type: 'AWS::IAM::Role',\n      Properties: {\n        ManagedPolicyArns: [\n          // Reference a policy ARN, using your AWS Account ID\n          Join([\n            'arn:aws:iam::',\n            AccountId(),\n          ]),\n          \n          // Reference a policy ARN, from the same CF template,\n          // using `Fn::Att`\n          Attr('SomePolicy', 'Arn'),\n          \n          // Reference a policy ARN, from the same CF template,\n          // using `{ Ref }`\n          Ref('SomePolicy')\n        ]\n      }\n    }\n  }\n};\n```\n","readmeFilename":"README.md"}