Skip to content

A simple setup to install and deploy an OpenAi Lambda layer using docker. It handles all the setup, dependencies, and pushes the layer to AWS.

License

Notifications You must be signed in to change notification settings

prudhvideep/openai-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI API Deployment on AWS Lambda

A simple setup to install and deploy an OpenAi Lambda layer using docker. It handles all the setup, dependencies, and pushes the layer to AWS.

Prerequisites

  • Docker.
  • AWS account with sufficient permissions to create and manage Lambda layers
  • AWS Access Key ID and Secret Access Key

Getting Started

Step 1: Clone the repository

git clone <repository-url>
cd <repository-folder>

Step 2: Build the docker image

docker build --build-arg AWS_ACCESS_KEY_ID=<your-access-key-id> \
             --build-arg AWS_SECRET_ACCESS_KEY=<your-secret-access-key> \
             --build-arg AWS_DEFAULT_REGION=us-east-1 \
             -t openai-lambda-layer .

Step 3: Run the Docker container to deploy the lambda layer

docker run -e AWS_ACCESS_KEY_ID=<your-access-key-id> \
           -e AWS_SECRET_ACCESS_KEY=<your-secret-access-key> \
           openai-lambda-layer

Deployment issues

Check the aws cli configuration

docker run -it openai-lambda-layer aws configure list

About

A simple setup to install and deploy an OpenAi Lambda layer using docker. It handles all the setup, dependencies, and pushes the layer to AWS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published