If I were to run prefect's docker container in an ...
# prefect-community
If I were to run prefect's docker container in an aws lambda, how would I tell it what my handler is?
Copy code
FROM prefecthq/prefect:2.4.2-python3.9
COPY service.py .
COPY requirements.txt .
RUN pip install -r requirements.txt
CMD [ "service.handler" ]
For example this doesn't work because I am not using aws' base image so CMD [ "service.handler" ] isn't properly setting the handler
check out this post - it would need to be named as script_name.lambda_handler_function_name
In that example you use the public.ecr.aws/lambda/python:3.9 base image. My question is how to do this when using a different base image. For example using the prefecthq/prefect:2.4.2-python3.9 base image
I wouldn't recommend it since this way you would then need to install Lambda's runtime environment. I tried that and faced weird issues due to Lambda's limitations
Lambda's image comes prepackaged wir everything you need to run things on Lambda and it's much easier to install prefect there than the other way around
well the aws/lambda image has a version of sqlite.x86_64 that is not compatible with Orion. yum install sqlite.x86_64-3.24.0 and yum update sqlite.x86_64 don't seem to fix it.
👍 1