dynamo-replicator
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "dynamo-replicator", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "replicator.js", | ||
"dependencies": { | ||
"aws-sdk": "^2.2.33", | ||
"denodeify": "^1.2.1", | ||
"es6-promise": "^3.0.2" | ||
"denodeify": "^1.2.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"mocha": "^2.4.5", | ||
"rewire": "^2.5.1" | ||
}, | ||
"scripts": { | ||
"test": "mocha" | ||
} | ||
} |
@@ -18,3 +18,3 @@ # DynamoDB Replicator | ||
1. In the Overview tab of the DynamoDB table in the AWS console click **Manage Stream**. | ||
1. In the overlay that pops up choose **New Image** (although **New and old images** should also work). | ||
1. In the overlay that pops up choose **New Image** (although **New and old images** should also work should you need that for other reasons). | ||
1. Click **Enable**. | ||
@@ -24,3 +24,3 @@ | ||
``` | ||
```json | ||
{ | ||
@@ -48,3 +48,3 @@ "AWSTemplateFormatVersion": "2010-09-09", | ||
1. Create a new Lambda function with a role that has sufficient IAM permissions (as a minimum it needs `dynamodb::PutItem` and `dynamodb::DeleteItem` on the **slave** table. | ||
1. On the **Triggers** tab of your **master** DynamoDB, click **Create Trigger** and **New Function**; for the **Configure event source** options, leave everything as default and click **Next**; for the **Configure function** options name your function something like `dynamodb-replicator` and for **Code entry type** select **Upload a .ZIP file** and choose the zip file created earlier. | ||
1. On the **Triggers** tab of your **master** DynamoDB, click **Create Trigger** and **New Function**; for the **Configure event source** options, ensure the **DynamoDB table** is your master table and leave everything else as default and click **Next**; for the **Configure function** options name your function something like `dynamodb-replicator` and for **Code entry type** select **Upload a .ZIP file** and choose the zip file created earlier. | ||
1. Repeat the previous step for multiple slaves changing `SLAVE-REGION` and `SLAVE-TABLE` in `index.js` each time and re-zipping for each slave. | ||
@@ -54,3 +54,3 @@ 1. Test by creating and deleting items from the **master** table and ensuring that the slaves update accordingly. | ||
**Contents of `index.json`**: | ||
``` | ||
```js | ||
'use strict'; | ||
@@ -65,3 +65,3 @@ | ||
exports.handle = function(event, context) { | ||
exports.handler = function(event, context) { | ||
replicator.process(event) | ||
@@ -68,0 +68,0 @@ .then(function() { |
8458
2
9
191
3
- Removedes6-promise@^3.0.2
- Removedes6-promise@3.3.1(transitive)