The container image must implement the Lambda Runtime API.The AWS open-source runtime interface clients implement the API. You can add a runtime interface client to your preferred base image to make it compatible with Lambda.
https://docs.aws.amazon.com/lambda/latest/dg/images-create.html

