Idempotent Requests is a demo of retry-safe API behavior across client and server boundaries.
It explores how idempotency keys help systems handle retries without accidentally duplicating work.
Modern APIs are surrounded by retries: browsers retry, infrastructure retries, clients retry, and users retry. Idempotency turns that uncertainty into an explicit protocol.
Full documentation, synced from the package README:
A demonstration project showcasing how to implement idempotent requests in AWS Lambda functions using the AWS Lambda Powertools library. This project includes both backend and frontend components to demonstrate the complete flow of idempotent request handling.
.
├── src/ # Source code for both frontend and backend
│ ├── backend/ # AWS Lambda functions and infrastructure
│ └── frontend/ # React frontend application
├── scripts/ # Utility scripts
└── docs/ # Project documentationIn the root dir run:
# Install dependencies
npm run setup
Configure AWS credentials:
~/.aws/credentialsDeploy the backend:
cd src/backend
npm run deployThe backend consists of AWS Lambda functions that demonstrate idempotent request handling using AWS Lambda Powertools. Key features:
To start the development server:
npm startTo run tests:
cd src/backend
pnpm run testThe frontend is a React application that demonstrates how to interact with the idempotent API endpoints.
To start the development server:
cd src/frontend
npm startMake sure to deploy the backend first to setup the API endpoint.
Pull in the backend api endpoint automatically with
cd src/frontend
npm run syncThe project uses:
@aws-lambda-powertools/idempotency for idempotencyISC