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.
- Docker.
- AWS account with sufficient permissions to create and manage Lambda layers
- AWS Access Key ID and Secret Access Key
git clone <repository-url>
cd <repository-folder>
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 .
docker run -e AWS_ACCESS_KEY_ID=<your-access-key-id> \
-e AWS_SECRET_ACCESS_KEY=<your-secret-access-key> \
openai-lambda-layer
Check the aws cli configuration
docker run -it openai-lambda-layer aws configure list