申倬豪
申倬豪
AWS lambda requires that users should write [idempotent functions](https://aws.amazon.com/premiumsupport/knowledge-center/lambda-function-idempotent/). However, some functions in `aws-node-mongodb-atlas` do not ensure idempotence. For example, [`performQuery()`](https://github.com/serverless/examples/blob/72b9dbd10b80875969e2a015a8743324379ab92c/aws-node-mongodb-atlas/handler.js#L69) may insert more than one pet into the DynamoDB...
AWS uses retry to perform fault tolerance. To ensure correctness under retry, functions should be idempotent (AWS lambda requires that users should write [idempotent functions](https://aws.amazon.com/premiumsupport/knowledge-center/lambda-function-idempotent/). However, the function [`create_order`](https://github.com/aws-samples/aws-serverless-ecommerce-platform/blob/f504690fbbb9ff0335723bdc231bca97fb1a5db2/orders/src/create_order/main.py#L273-L284) is...