Year
2022
Context
Personal project
Role
Sole author
Status
Completed

Overview

A serverless inference API that labels text as POSITIVE or NEGATIVE with DistilBERT. It runs as a Docker container on AWS Lambda behind API Gateway, and the repository covers the whole path from a model checkpoint to a public cloud endpoint.

Architecture

API Gateway receives the HTTP request and invokes the Lambda function, which runs a Docker container holding a FastAPI application. Mangum adapts FastAPI’s ASGI interface to Lambda’s event-based invocation. The DistilBERT model, fine-tuned on SST-2, is downloaded at image build time so a cold start does not have to fetch it.

Key Design Decisions

Tech Stack