{"_id":"@dolsem/serverless-offline-dynamodb-streams","_rev":"1-45bbe0b7ade94d50f61ac0cd8ea5554f","name":"@dolsem/serverless-offline-dynamodb-streams","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@dolsem/serverless-offline-dynamodb-streams","version":"3.0.0","description":"Emulate AWS λ and DynamoDB streams locally when developing your Serverless project","main":"src","repository":{"type":"git","url":"git+ssh://git@github.com/dolsem/serverless-plugins.git"},"bugs":{"url":"https://github.com/dolsem/serverless-plugins/issues"},"homepage":"https://github.com/dolsem/serverless-plugins/tree/master/packages/serverless-offline-dynamodb-streams#readme","author":{"name":"godu"},"license":"MIT","peerDependencies":{"serverless-offline":"^5.11.0"},"dependencies":{"aws-sdk":"^2.538.0","dynamodb-streams-readable":"^1.0.4","figures":"^3.0.0","lodash":"^4.17.15"},"devDependencies":{"serverless-offline":"^5.11.0"},"keywords":["kinesis","dynamodb","lambda"],"_id":"@dolsem/serverless-offline-dynamodb-streams@3.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-1b1ImlRZ8qEBe2HZQ6xxC3cx1eSb+vS8TPUlyUZrvdA8dsj3QbaGA+bAv4hgyj+2Ex4qkNYQwFarYLUMMFPOdg==","shasum":"33bc95dd0ed14e7dd6ec3d28a4068672cfbee7ba","tarball":"https://registry.npmjs.org/@dolsem/serverless-offline-dynamodb-streams/-/serverless-offline-dynamodb-streams-3.0.0.tgz","fileCount":3,"unpackedSize":10927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsK5TCRA9TVsSAnZWagAA6ugP/RAzsQX9wAD6nTEmJ+aE\nfl+jWiJOG9AV5AS81DCAeY4i9vcd7NwXZ4qDB29B+iYIT4MX9Y4buMQo9PRU\nEL5ZTyKTEDAlz2GTnet/A9qkBp4kQ97elu9IB3Gdcp27W9Rk+JByDmA1ZhGq\nMq9gJ0axgrZykbtYU7jCdm4JftsHinsJIH6lFjjoJyQxUWHp53E2A/74t8Lh\nnew+4xnuL0zVesTLdqOj34IuEbkuzbKzLWyrNKE3MfiMGCUPDkaoNXrArsxX\nu9QsFwJJCHQ0tiblFaFg9/sGmmpANug3qPadDPPYm2LxYft+qMK/kbuzlANw\n9qZ2b9sA5b+/aRVDMHpOUYNjBbvnruJD1Zk6FilJwZD4fKsM3vcFxJ/Ie6J7\n0aGJvQ9nFN5zlrvr1k+q14V7DBm9zthS+rhQ8oOxYVx5kyh73DU+Dyix6aja\ngU16Xxr0jltDzz9e0XND4a1TflHObgSIEECngY84pNSFSfIJ/Gahz8b98Jpr\nKVUSKOQ9O4DtNNqqJBNG5LblmkEfVsjoPkm0bCJAOpm+N5ruXPcuP9VR7TAW\nhLGDBKoRHLWw8OttDEB+cTgUf0s2oT1sM7A9IkexI4hhdn/2P3pTab4XiBQO\nqE66JbXtdiNNg57cWPy34Yk79c5nDEXZUmPKCm5R7x48hjrupiBRFaRG6cJ2\n70cF\r\n=TFVu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeUsAYAJyIxkAbmjHACR8sEe8yebXAfG5C9Zv+pYKrlwIgHPF0A90qW0y5GuYZax3EKfVm2LQfdvtUGw40k91a8WM="}]},"maintainers":[{"name":"dolsem","email":"dols3m@gmail.com"}],"_npmUser":{"name":"dolsem","email":"dols3m@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/serverless-offline-dynamodb-streams_3.0.0_1571860051136_0.45004704710438803"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-23T19:47:30.915Z","3.0.0":"2019-10-23T19:47:31.329Z","modified":"2022-04-05T05:09:26.382Z"},"maintainers":[{"name":"dolsem","email":"dols3m@gmail.com"}],"description":"Emulate AWS λ and DynamoDB streams locally when developing your Serverless project","homepage":"https://github.com/dolsem/serverless-plugins/tree/master/packages/serverless-offline-dynamodb-streams#readme","keywords":["kinesis","dynamodb","lambda"],"repository":{"type":"git","url":"git+ssh://git@github.com/dolsem/serverless-plugins.git"},"author":{"name":"godu"},"bugs":{"url":"https://github.com/dolsem/serverless-plugins/issues"},"license":"MIT","readme":"# serverless-offline-dynamodb-streams\n\nThis Serverless-offline-dynamodb-streams plugin emulates AWS λ and DynamoDBStreams on your local machine. To do so, it listens DynamoDBStreams stream and invokes your handlers.\n\n*Features*:\n- [Serverless Webpack](https://github.com/serverless-heaven/serverless-webpack/) support.\n- DynamoDBStreams configurations: batchsize and startingPosition.\n\n## Installation\n\nFirst, add `serverless-offline-dynamodb-streams` to your project:\n\n```sh\nnpm install serverless-offline-dynamodb-streams\n```\n\nThen inside your project's `serverless.yml` file, add following entry to the plugins section before `serverless-offline` (and after `serverless-webpack` if presents): `serverless-offline-dynamodb-streams`.\n\n```yml\nplugins:\n  - serverless-webpack\n  - serverless-offline-dynamodb-streams\n  - serverless-offline\n```\n\n[See example](../serverless-offline-dynamodb-streams-integration/README.md)\n\n## Configure\n\n### Functions\n\nThs configuration of function of the plugin follows the [serverless documentation](https://serverless.com/framework/docs/providers/aws/events/streams/).\n\n```yml\nfunctions:\n  myKinesisHandler:\n    handler: handler.compute\n    events:\n      - stream:\n          enabled: true\n          type: dynamodb\n          arn: arn:aws:dynamodb:eu-west-1:XXXXXX:table/myStream/stream/2018-07-02T19:48:31.121\n          batchSize: 10\n          startingPosition: TRIM_HORIZON\n```\n\n\n### DynamoDB\n\nThe configuration of [`aws.DynamoDBStreams`'s client](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDBStreams.html#constructor-property) of the plugin is done by defining a `custom: serverless-offline-dynamodb-streams` object in your `serverless.yml` with your specific configuration.\n\nYou could use [mhart's Dynalite](https://github.com/mhart/dynalite) with the following configuration:\n\n```yml\ncustom:\n  serverless-offline-dynamodb-streams:\n    apiVersion: '2013-12-02'\n    endpoint: http://0.0.0.0:8000\n    region: eu-west-1\n    accessKeyId: root\n    secretAccessKey: root\n    skipCacheInvalidation: false\n    readInterval: 500\n```\n\n> `arn` could be deduce from `tableName` if your add the key `tableName` in your function's configuration. Useful if your use dynalite and regularly recreate a new DynamoDBStreams.\n\n```yml\nfunctions:\n  myKinesisHandler:\n    handler: handler.compute\n    events:\n      - stream:\n          enabled: true\n          type: dynamodb\n          tableName: myTable\n```\n\n### Retries\n\nBy default if function fails it will be invoked in a loop until it succeeds. You can specify a finite number of retries instead:\n\n```yml\ncustom:\n  serverless-offline-dynamodb-streams:\n    retries: 0 # disables retries\n```\n","readmeFilename":"README.md"}