Closed yike5460 closed 3 years ago
Hello, @yike5460.
I see that in your Dockerfile you are using lambci/lambda-base:build to build the Runtime Interface Client:
FROM lambci/lambda-base:build as build-image
The image you are using seems to be using Python 2.7 and this version is not supported in the Runtime Interface Client.
At the moment, RIC only supports Python versions 3.6.x up to and including 3.9.x as stated in the Requirements section.
I suggest trying to update the Python version from the image or use another image with the required Python version.
Feel free to reach out if you are still facing issues.
@stefanbotez thanks for your reminder, forget to update. Already solved by using public.ecr.aws/bitnami/python:3.7 or python:buster. Also note that both build-image and multi-stage build should be the same, otherwise issues like dependencies missing happens.
Hi folks
I been exploring our container support in Lambda, for both official container image (public.ecr.aws/lambda/python:3.7) and customized image with RIC/RIE (python:buster). The official image works fine, however customized image failed with error for local invoke
curl -X POST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"payload":"hello world!"}'
, or Lambda console invoke. Not sure it's dockerfile compose, RIC/RIE or other issue, anyone had been met the same issue?local env:
Lambda console:
My dockerfile:
And entry.sh embedded