DEV Community

Discussion on: Deploy Python Lambda Functions With Container Image

Collapse
 
vumdao profile image
🚀 Vu Dao 🚀

Hi Jason,

I guess you're trying to build lambda image from alternative base image but I recommend to use image base from AWS such as public.ecr.aws/lambda/python:3.8 or amazon/aws-lambda-python:3.8

For your issue, you're missing setting ENV AWS_LAMBDA_RUNTIME_API=, this variable env must be defined but you will still get following error after that

  File "/function/awslambdaric/lambda_runtime_client.py", line 76, in wait_next_invocation
    response_body, headers = runtime_client.next()
RuntimeError: Failed to get next
Enter fullscreen mode Exit fullscreen mode