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
a
Anna Geller
09/26/2022, 6:16 PM
check out this post - it would need to be named as script_name.lambda_handler_function_name
n
Nathaniel Russell
09/26/2022, 6:26 PM
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
a
Anna Geller
09/26/2022, 6:40 PM
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
Anna Geller
09/26/2022, 6:43 PM
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
n
Nathaniel Russell
09/26/2022, 7:41 PM
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.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.