amplify-category-api
amplify-category-api copied to clipboard
ElasticSearch Streaming Function gives ERROR on REMOVE
Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v16.13.0
Amplify CLI Version
v7.6.20
What operating system are you using?
Linux
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Amplify Categories
Not applicable
Amplify Commands
Not applicable
Describe the bug
There was an enhancement a year or so ago where the _version on the DynamoDB record was synced with ElasticSearch.
However, if the record was set to deleted ( _deleted = true / _ttl exists) then the record was deleted from ElasticSearch - even though it still exists in DynamoDB.
Am fine with the above behaviour, however have just noticed that when the _ttl time is reached and the record is finally removed from DynamoDB it tries to also remove it from ElasticSearch and generates a failure/error in CloudWatch.
Expected behavior
That the streaming function realizes that a record that has _deleted = true has already been deleted from ElasticSearch and not try to delete it from ElasticSearch when the DynamoDB record is removed.
Reproduction steps
As described above
GraphQL schema(s)
# Put schemas below this line
Log output
# Put your logs below this line
Additional information
No response