serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
Unexpected key `ContributorInsightsSpecification`
Dynamodb support ContributorInsightsSpecificationoptions. The options used to enable or disable CloudWatch Contributor Insights.
When running serverless offline start, the following error occurs.
MultipleValidationErrors: There were 4 validation errors:
* UnexpectedParameter: Unexpected key 'ContributorInsightsSpecification' found in params.GlobalSecondaryIndexes[0]
* UnexpectedParameter: Unexpected key 'ContributorInsightsSpecification' found in params.GlobalSecondaryIndexes[1]
* UnexpectedParameter: Unexpected key 'ContributorInsightsSpecification' found in params.GlobalSecondaryIndexes[2]
* UnexpectedParameter: Unexpected key 'ContributorInsightsSpecification' found in params: DynamoDB - Error -
If ContributorInsightsSpecification option is declared in Table Properties and GlobalSecondaryIndexes, you should ignore it.
FYI: This package (serverless-dynamodb-local) doesn't appear to be maintained, with no new releases to NPM in over 2 years.
Solution: You can use serverless-dynamodb, a maintained fork, instead. (Disclaimer: I am a contributor to this fork). It is a drop-in replacement for this package, and is updated to fix this bug (see https://github.com/raisenational/serverless-dynamodb/pull/1). This is a drop-in replacement for serverless-dynamodb-local, so to upgrade simply:
- Uninstall
serverless-dynamodb-local, e.g.npm uninstall serverless-dynamodb-local - Install
serverless-dynamodb, e.g.npm install serverless-dynamodb - Update references in your code, including your serverless config, from
serverless-dynamodb-localtoserverless-dynamodb(quite possible that you won't have any, as you just refer to it from your serverless config) - (optional) Update your serverless config custom
dynamodbkey toserverless-dynamodb
Of course, it's all still open-source and MIT licensed. Ownership of this new package sits with a registered charity, that is committed to maintaining the package into the future and is open to contributions from the community.
In any case would be open to feedback on the fork - can drop create an issue in that repository or email me (address on profile).
Thanks @domdomegg I will change to your package and contribute there.