Code Monkey home page Code Monkey logo

custom-lambda's Introduction

Custom Lambda

This repo aimed to build an alternative version for AWS Lambda Hosting. It is a simple and lightweight serverless framework that allows you to run your code without provisioning or managing servers. It is a great way to build serverless applications and microservices.

Description

This project replicates the Hosting of AWS Lambda with Python and FastAPI. For more information about AWS Lambda, you can visit here.

Features:

  • Supports serverless functions in Python
  • Run all functions locally
  • Allows user to deploy new function while not interrupting the existing ones
  • Allows install new dependencies without rebuilding the image

Installation

Before starting, you need to copy the .env.example file to .env and fill in the required environment variables.

cp .env.example .env
  1. Docker

    To run the application, you need to have Docker and installed on your machine. You can install Docker from here.

docker build -t custom-lambda .
docker run -d -p 9999:9999 custom-lambda
  1. Docker Compose

    You can install Docker Compose from here. Then, you can run the following command to build and run the application:

docker-compose up --build -d
  1. Pure Python

    You can also run the application without Docker. You need to have Python 3.8 or later installed on your machine. Then, you can run the following command to install the dependencies and run the application:

pip install -r requirements.txt
uvicorn app:app --host 127.0.0.1 --port 9999

Usage

You can call bash script from test directory to test the application.

Visit http://localhost:9999/docs to see the API documentation.

Roadmap

v1.0.0:

  • Allow user to CREATE invokee function in Python
  • Uers can EXECUTE the function
  • Users can GET all functions, GET a function by its name
  • Users can MODIFY existing functions and DELETE a function
  • Functions is stored distributedly in the file system
  • Added logging for each function

v1.0.1 (Upcoming):

  • In-app package installation (through pip)
  • Add Timeout and Memory Limit for each function
  • Limit file size for each function
  • Add simple UI for the application

v1.0.2 (Upcoming):

  • Separate function uploading and function executing channels
  • Separate dependency for each function
  • Add support for other languages

custom-lambda's People

Contributors

ball2004244 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.