Hi guys, I am following Prefect's Anna Geller's M...
# ask-community
t
Hi guys, I am following Prefect's Anna Geller's Medium blog post on how to use Prefect in AWS Lambdas using Docker images. Following the blog, I did the following: • Wrote a simple Python script with a simple flow • Added a Dockerfile that uses the AWS Lambda Docker base image, installs dependencies and adds the script as a handler • Build the image • Ran the image • Tested the image locally (following AWS's docs) I kept getting weird errors that 'State' object has no attribute 'services', and I couldn't figure out why. After some googling, turns out that the sqlite3 version of AWS Lambdas Docker image runtime is 3.7, but Prefect needs >3.24. So I got curious, and cloned the blog's repo and tried following the exact same steps with her code, because how come her code would work with exactly the same steps but mine wouldn't? Conclusion is that her code also doesn't work, which is weird, because it must have worked when she wrote the blog post, so what is different now? Using Docker + the same AWS Lambda base image should prevent exactly such issues, or in other words, ensure it runs anywhere, but in this case it doesn't. Am I forgetting something important here? Am I overlooking something? Do you guys have any ideas what could be wrong, or how I could get this to work? See the blog post here: https://medium.com/the-prefect-blog/event-driven-data-pipelines-with-aws-lambda-prefect-and-github-actions-b3d9f84b1309 See the repo here: https://github.com/anna-geller/prefect-aws-lambda/tree/master
j
It may be that things worked with an older version of Prefect