Create multiple Lambda functions using single docker image

Publicado el: 05 octubre 2023
en el canal de: The iT Tech Solutions
1,531
16

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


En esta página del sitio puede ver el video en línea Create multiple Lambda functions using single docker image de Duración hora minuto segunda en buena calidad , que subió el usuario The iT Tech Solutions 05 octubre 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,531 veces y le gustó 16 a los espectadores. Disfruta viendo!