Hi Hamza! This usually happens if you run Amazon Linux on your EC2 instance, because it comes with a very old version of SQLite installed.
The easiest way to overcome the issue is to use Anaconda. I wrote a post on how to do it here:
https://discourse.prefect.io/t/how-to-run-prefect-2-on-centos-7-or-rhel-7/1507
The post is about CentOS, but Amazon Linux is based on CentOS, so the instructions should work.
Alternatively, if you don't
need to run Amazon Linux, you could use one of the other distros EC2 supports. Ubuntu 22.04 LTS would be a good choice.