serverless / serverless/examples

[BUG] aws-node-mongodb-atlas idempotent issue

Open
#651 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.5k
Forks
4.4k
Avg merge
2h 55m
Merged PRs (30d)
3

Description

AWS lambda requires that users should write idempotent functions.
However, some functions in aws-node-mongodb-atlas do not ensure idempotence. For example, performQuery() may insert more than one pet into the DynamoDB table when the function fails and is retried by the lambda platform.

I was wondering whether it is a bug or the function does not need to be idempotent.

Please let me know if I've missed something or if my understanding of the code is incorrect. Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with aws-node-mongodb-atlas/handler.js, especially the performQuery() entry point linked in the issue, and review the AWS Lambda idempotence guidance. Determine whether retries can create duplicate records and what behavior the example is intended to demonstrate; the issue is done only when that expectation and any required change are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript, mongodb
Domain
backend, cloud, databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.