This is a AWS Lambda function for managing a product inventory using Amazon DynamoDB. The service supports basic CRUD operations (Create, Read, Update, Delete) for products.
- AWS Lambda
- Amazon DynamoDB
- Python 3.8 or later
- Create an Amazon DynamoDB table with the name 'product-inventory'.
- Deploy this Lambda function with the required permissions to access the DynamoDB table.
- Path:
/health
- Method:
GET
- Description: Check the health of the service.
- Path:
/product
- Method:
GET
- Description: Retrieve product details by providing the product ID as a query parameter.
- Example:
/product?productId=123
- Path:
/products
- Method:
GET
- Description: Retrieve details of all products.
- Path:
/product
- Method:
POST
- Description: Save a new product by providing the product details in the request body.
- Path:
/product
- Method:
PATCH
- Description: Update a product's information by providing the product ID, update key, and update value in the request body.
- Path:
/product
- Method:
DELETE
- Description: Delete a product by providing the product ID in the request body.
Feel free to contribute by opening issues or creating pull requests. Your feedback and contributions are highly appreciated!