Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected key ContributorInsightsSpecification #289

Open
coderhglee opened this issue Jan 14, 2023 · 2 comments
Open

Unexpected key ContributorInsightsSpecification #289

coderhglee opened this issue Jan 14, 2023 · 2 comments

Comments

@coderhglee
Copy link

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.

@domdomegg
Copy link

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 raisenational#1). This is a drop-in replacement for serverless-dynamodb-local, so to upgrade simply:

  1. Uninstall serverless-dynamodb-local, e.g. npm uninstall serverless-dynamodb-local
  2. Install serverless-dynamodb, e.g. npm install serverless-dynamodb
  3. Update references in your code, including your serverless config, from serverless-dynamodb-local to serverless-dynamodb (quite possible that you won't have any, as you just refer to it from your serverless config)
  4. (optional) Update your serverless config custom dynamodb key to serverless-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.

There's an explanation as to the intentions behind this fork, and how it compares to other forks in the README.

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).

@coderhglee
Copy link
Author

Thanks @domdomegg I will change to your package and contribute there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants