Socket
Socket
Sign inDemoInstall

aws-cdk-dynamodb-seeder

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-cdk-dynamodb-seeder - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "aws-cdk-dynamodb-seeder",
"version": "1.2.0",
"version": "1.2.1",
"description": "A simple CDK JSON seeder for DynamoDB",

@@ -5,0 +5,0 @@ "scripts": {

@@ -39,3 +39,5 @@ # aws-cdk-dynamodb-seeder

tableName: "MyTable",
setup: require("./my-seed-data.json")
setup: require("./items-to-put.json"),
teardown: require("./keys-to-delete.json"),
refreshOnUpdate: true // runs setup and teardown on every update, default false
});

@@ -46,6 +48,12 @@ ```

Seed data is imported/deleted via an arrays of objects.
Just remember that the objects _must_ match your table's key definitions.
Data passed into `setup` ("Items" to put) or `teardown` ("Keys" to delete) should be an `array` of JavaScript objects (that are, in turn, representations of `string` to [AttributeValue] maps).
* `setup` elements should use the format of `params.Item` from [AWS.DynamoDB.DocumentClient.put()]
* `teardown` elements should use the format of `params.Key` from [AWS.DynamoDB.DocumentClient.delete()]
[aws cdk]: https://aws.amazon.com/cdk
[amazon dynamodb]: https://aws.amazon.com/dynamodb
[AttributeValue]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html
[AWS.DynamoDB.DocumentClient.put()]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#put-property
[AWS.DynamoDB.DocumentClient.delete()]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#delete-property
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc