Create multiple Lambda functions using single docker image
Let's learn how to deploy multiple lambda functions using docker image. Here we will be using a single docker image to deploy two AWS lambda functions and create them in AWS using console.
We will use docker desktop to create docker image for lambda and deploy it to ECR and create the lambda using this image
How to setup AWS CLI on Windows: • Install AWS CLI on Windows
How to install Docker Desktop on Windows: • Install Docker Desktop on Windows
How to deploy a lambda using docker image: • Create a Lambda using Docker Image and Ama...
Sample docker file:
FROM public.ecr.aws/lambda/python:3.11
Copy files to root of the image
COPY . .
Install the specified packages
RUN pip install -r requirements.txt
Sample Docker Commands:
1. docker build --platform linux/amd64 -t docker-image:test .
2. aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 111122223333.dkr.ecr.us-east-1.amazonaws.com
3. aws ecr create-repository --repository-name hello-world --image-scanning-configuration scanOnPush=true --image-tag-mutability MUTABLE
4. docker tag docker-image:test 111122223333.dkr.ecr.us-east-1.amazonaws.com/hello-world:latest
5. docker push 111122223333.dkr.ecr.us-east-1.amazonaws.com/hello-world:latest
6. create the function using console
Nesta página do site você pode assistir ao vídeo on-line Create multiple Lambda functions using single docker image duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário The iT Tech Solutions 05 Outubro 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,531 vezes e gostou 16 espectadores. Boa visualização!