aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
89 stars 77 forks source link

ElasticSearch Streaming Function gives ERROR on REMOVE #111

Open sacrampton opened 2 years ago

sacrampton commented 2 years ago

Before opening, please confirm:

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)

```graphql # Put schemas below this line ```

Log output

``` # Put your logs below this line ```

Additional information

No response

sacrampton commented 2 years ago

Hi @josefaidt @yuth @Straubulous - any update on progress on this one?

josefaidt commented 2 years ago

Hey @sacrampton :wave: unfortunately I do not have a time estimate, however I have added this issue to our bug bash board to be investigated as part of our weekly bug bash 🙂

sacrampton commented 2 years ago

Hi @alharris-at - just checking back in on this one