🌐
Amazon Web Services
docs.aws.amazon.com › aws lambda › developer guide › aws lambda functions › programming languages › building lambda functions with python › deploy python lambda functions with container images
Deploy Python Lambda functions with container images - AWS Lambda
For more information about the ... for AWS Lambda ... To run AL2023-based images locally, including with AWS Serverless Application Model (AWS SAM), you must use Docker version 20.10.10 or later. When you use an import statement in your code, the Python runtime searches ...
🌐
Docker Hub
hub.docker.com › r › amazon › aws-lambda-python
amazon/aws-lambda-python - Docker Image
AWS provided base images for Lambda contain all the required components to run your functions packaged as container images on AWS Lambda.
Discussions

Lambda Python Dockerfile Yum
I think it's AWS linux 2 base image that all their lambda images are built on changed. I believe we have to use APK now. I just pulled the latest amazonlinux2 image and confirmed it does not have yum and does have apk. More on reddit.com
🌐 r/aws
5
5
December 5, 2023
AWS Lambda: Package as Docker container or zip+Lambda layer?
Docker 100%. Mainly so I don’t need to use SAM local + cloudformation templates ever again. Docker compose + postman is a much better user experience imo. More on reddit.com
🌐 r/aws
17
7
December 1, 2022
Working with AWS Lambda Python from Docker images - why is apt-get command missing?
If it's some stripped-down version of Amazon Linux in these blobs, you might have some luck with yum if they didn't remove it (you'll probably need to add the EPEL repo manually etc. as with other RHEL-derived containers) More on reddit.com
🌐 r/docker
6
4
April 19, 2021
End-to-End Tutorial on Combining AWS Lambda, Docker, and Python

AWS Lambda recently added support for Docker images with Python, where before you had to zip all your code and dependencies. With this update I wanted to make a full length tutorial to cover everything necessary to be productive.

The playlist is broken into six parts:

  1. An introduction to the app that will be built and the various AWS components that will be used

  2. Cloning the GitHub repo and doing necessary setup to test the application locally

  3. Creating a Docker image of the Python script and running it on AWS Lambda, while also showing how painful it is to do even minor updates

  4. Adding CI/CD with GitHub Actions to speed up code updates

  5. Adding AWS Cloudwatch to create a cron job that schedules the Lambda function to run on periodic intervals

  6. Walking through an AWS Cloudformation yaml template that will create the Lambda function and Cloudwatch rule automatically and covering all the benefits of using a Cloudformation template

This tutorial truly is end-to-end. If you enjoy the content, you can help me a ton by doing any or all of the following:

  • supporting me on Patreon

  • subscribing to my YouTube channel

  • liking and/or commenting on the video

  • sharing the video or channel on any platform (reddit, twitter, discord, etc.)

  • starring the GitHub repo

  • following me on GitHub

Any questions or requests, just leave a comment.

More on reddit.com
🌐 r/Python
16
297
February 18, 2023
🌐
ECR Public Gallery
gallery.ecr.aws › lambda › python
Amazon ECR Public Gallery - AWS Lambda/python
AWS provided base images for Lambda contain all the required components to run your functions packaged as container images on AWS Lambda.
🌐
Medium
medium.com › @skalyani103 › python-on-aws-lambda-using-docker-images-5740664c54ca
Python on AWS Lambda using Docker images | by Kalyani Subbiah | Medium
June 14, 2022 - URL_STRING=".dkr.ecr.us-east-1.amazonaws.com"CONTAINER_STRING="<project>"IMAGE_STRING="latest"ECR_IMAGE_URI="$AWS_ACCOUNT_ID$URL_STRING/$CONTAINER_STRING:$IMAGE_STRING"# log in to ECRaws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin "$AWS_ACCOUNT_ID$URL_STRING"# remove previous images to save space docker rmi "$AWS_ACCOUNT_ID$URL_STRING/$CONTAINER_STRING" docker rmi "$CONTAINER_STRING"# build image docker build --tag "$CONTAINER_STRING" .# tag and push to AWS ECR docker tag $CONTAINER_STRING:latest "$ECR_IMAGE_URI" docker push "$ECR_IMAGE_URI" Create Lambda function and attach your ECR Image with the following settings
🌐
Medium
aws.plainenglish.io › i-have-always-loved-leveraging-serverless-technologies-and-no-service-has-been-used-more-by-me-6c176e52261e
Ramping AWS Lambda Using Docker Images | by Hassan Jalil | AWS in Plain English
May 29, 2023 - This worked for most cases, but in cases where you may need additional C binaries, you were left scratching your head. The solution is to create a docker image that was based on Amazon Linux.
🌐
GitHub
github.com › aws › aws-lambda-base-images
GitHub - aws/aws-lambda-base-images · GitHub
These images are published to the Lambda public ECR repository and DockerHub. To learn more about how to use these images, check out the AWS documentation on how to Create an image from an AWS base image for Lambda. Each image contains Amazon Linux system libraries, the language runtime for a given programming language, dependencies, certificates, AWS SDK (Node.js, Python, and Ruby only) and the Lambda Runtime Interface Client (RIC).
Author: aws
🌐
Reddit
reddit.com › r/aws › lambda python dockerfile yum
r/aws on Reddit: Lambda Python Dockerfile Yum
December 5, 2023 -

Hi, I've been creating some code and uploading it using a Dockerfile image into AWS ECR. Then I load the image onto AWS Lambda where I run the code.

My docker file starts like this:

Start with the base image

FROM public.ecr.aws/lambda/python:3.11 as build

Install system-level dependencies for Chrome and FFmpeg

RUN yum install -y unzip atk cups-libs gtk3 libXcomposite alsa-lib \


I've been using this docker file with docker build and uploading it for weeks now without any issue. Today when I did docker build I got this error:

=> ERROR [ 2/16] RUN yum install -y unzip atk cups-libs gtk3 libXcomposite alsa-lib ERROR: failed to solve: process "/bin/sh -c yum install -y unzip atk cups-libs gtk3 libXcomposite alsa-lib

Which I thought could be the base image, that did not have yum installed. But it is the same 3.11 as previous days.

Any idea or solutions to this? Do you guys know if the base image python:3.11 has changed in any way recently?

Find elsewhere
🌐
DEV Community
dev.to › aws-builders › from-docker-to-lambda-an-aws-admins-journey-into-python-applications-24e4
From Docker to Lambda: An AWS Admin's Journey into Python Applications - DEV Community
January 20, 2025 - One for the docker-based one and another for the Lambda one. ... I needed something that would play nice with all the SQLAlchemy knowledge I'd just painfully acquired and after much contemplation (and several cups of coffee) later, I realized I could attempt to actually use both! SQLAlchemy speaks PostgreSQL Aurora Serverless seems like a good fit here. So, we make a dual-handler. @contextmanager def db_session(): """ Environment-aware database session manager.
🌐
Amazon Web Services
docs.aws.amazon.com › aws lambda › developer guide › aws lambda functions › configuring aws lambda functions › create a lambda function using a container image
Create a Lambda function using a container image - AWS Lambda
AWS periodically provides updates to the AWS base images for Lambda. If your Dockerfile includes the image name in the FROM property, your Docker client pulls the latest version of the image from the Amazon ECR repository · . To use the updated base image, you must rebuild your container image and update the function code ... The Node.js 20, Python ...
🌐
Reddit
reddit.com › r/docker › working with aws lambda python from docker images - why is apt-get command missing?
r/docker on Reddit: Working with AWS Lambda Python from Docker images - why is apt-get command missing?
April 19, 2021 -

Hi,

I'm trying to setup a Python lambda function that requires Pytorch. Apparently one of the code's dependencies is using libgl1-mesa-glx

In the Dockerfile I tried to add

RUN apt-get update && apt-get install libgl1-mesa-glx

But when building the Docker image it tells me it's missing the apt-get command. I tried also with aptitude and apt, but still nothing.

I'm building the Docker image public.ecr.aws/lambda/python:3.8 https://github.com/aws/aws-lambda-base-images/blob/python3.8/Dockerfile.python3.8 which is built FROM scratch as I can tell.

What can I do to solve this? Why is apt-get command missing and is there an alternative way to install the libgl1-mesa-glx stuff?

thanks

🌐
AWS
aws.amazon.com › blogs › compute › python-3-14-runtime-now-available-in-aws-lambda
Python 3.14 runtime now available in AWS Lambda | Amazon Web Services
November 19, 2025 - If you deploy your Lambda functions as container images, you must update your Dockerfiles to use dnf instead of yum when upgrading to the Python 3.14 base image from Python 3.11 or earlier base images. Learn more about the provided.al2023 runtime in the blog post Introducing the Amazon Linux 2023 runtime for AWS ...
🌐
DEV Community
dev.to › vumdao › deploy-python-lambda-functions-with-container-image-5hgj
Deploy Python Lambda Functions With Container Image - DEV Community
March 28, 2021 - ⚡ $ aws lambda invoke --function-name python-lambda-image --region ap-southeast-1 outfile { "StatusCode": 200, "ExecutedVersion": $LATEST" } ⚡ $ cat outfile "Hello from AWS Lambda using Python3.8.5 (default, Aug 5 2020, 08:22:02) \n[GCC 8.3.0]!" #### **2. Call lambda API from local container** - This should be performed from AWS image base - Run container · ⚡ $ docker run -d --name testapi -p 9000:8080 pythonlambda:latest
🌐
DEV Community
dev.to › aws-builders › how-to-package-and-deploy-a-lambda-function-as-a-container-image-3d1a
How to package and deploy a Lambda function as a container image - DEV Community
June 3, 2024 - Create a Dockerfile file and paste the following code: FROM amazon/aws-lambda-python:3.10 COPY app.py ./ CMD ["app.handler"]
🌐
Docker
hub.docker.com › layers › amazon › aws-lambda-python › 3.12 › images › sha256-07c81e0de1a03bdfccf10510d8d721ff0d31febbdb9befbea4c8372bde3aaf7d
amazon/aws-lambda-python:3.12
Docker Suite · Sign inSign up · Languages & frameworks · Integration & delivery · Machine learning & AI · Manifest digest · sha256:1965397387bae8db437d907cbb8e17b490edc8912b9ecab6abd394649bd25c1f · OS/ARCH · --- Compressed size · --- Last pushed · over 1 year by awslambdabuild ·
🌐
Reddit
reddit.com › r/python › end-to-end tutorial on combining aws lambda, docker, and python
End-to-End Tutorial on Combining AWS Lambda, Docker, and Python : r/Python
February 18, 2023 - Sorry, this post was deleted by the person who originally posted it. Archived post. New comments cannot be posted and votes cannot be cast. Share ... AWS Lambda recently added support for Docker images with Python, where before you had to zip all your code and dependencies.
🌐
Medium
medium.com › @o.ajayi2k1 › deploy-aws-lambda-function-with-container-image-runtime-using-aws-sam-model-b8d6454905eb
Deploy AWS Lambda Function with Python Container Image Runtime using AWS SAM Model | by Richard | Medium
May 15, 2024 - sam build #This builds the container image locally and gets it ready for ECR image deployment # The sam build is performed using the Dockerfile in the folder directory FROM public.ecr.aws/lambda/python:3.8 # Building from base image COPY requirements.txt ./ # Copy the application requirements into the image built RUN python3.8 -m pip install -r requirements.txt -t .
🌐
Medium
medium.com › geekculture › setup-a-lambda-function-using-docker-72356e0a4f13
Running AWS Lambda with Alpine Docker | by Bogdan Nic | Geek Culture | Medium
September 19, 2021 - Login into Docker: aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin <account>.dkr.ecr.<region>.amazonaws.com · You're done! ... Redeploy the Lambda using the select from containers.
🌐
Bank of Montreal
bmo.wd3.myworkdayjobs.com › External › job › REMOTETELETRAVAIL-ON-CAN › Senior-Cloud-Engineer_R260012816
Senior Cloud Engineer
Application Deadline: 10/29/2026 Address: VIRTUAL(R)59 - REMOTE/TELETRAVAIL - ON - BMO Job Family Group: Technology Job Summary The Senior Cloud Engineer is a core member of the Cloud Product Engineering team responsible for designing, building, and operating secure, scalable, and resilient cloud solutions for Amazon Web Services (AWS).