Skip to content

this is the code of the simple api which uses api gateway, lambda.

Notifications You must be signed in to change notification settings

saddam-sde/gateway-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

gateway-api

this is the code of the simple api which uses api gateway, lambda.

Bakery Menu Management

This project provides an API for managing a bakery menu using AWS Lambda and PostgreSQL.

Setup

  1. Clone the repository.

  2. Install the required dependencies by running pip install -r requirements.txt.

  3. Configure the PostgreSQL database connection by setting the values for username, password, host, database, and port in the lambda_handler function.

Code Structure

  • main.py: Contains the Lambda function handler and the SQLAlchemy models for the bakery menu.

Endpoints

GET /menu

Retrieves all records from the bakery menu.

POST /menu

Creates a new record in the bakery menu. Provide the item and date parameters in the request body.

PUT /menu

Updates an existing record in the bakery menu. Provide the id, item, and date parameters in the request body.

DELETE /menu

Deletes a record from the bakery menu. Provide the id parameter in the request body.

Usage

  1. Send a GET request to /menu to retrieve all records from the bakery menu.

  2. Send a POST request to /menu with the following JSON body to create a new record:

About

this is the code of the simple api which uses api gateway, lambda.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages