I found the following reference while debugging the same issue. It looks like the cause is what @manas sharma was describing in another comment. Aurora MySql 8.0 changed how large queries will function under the hood. You will most likely need to increase the temptable_max_mmap
variable for your database. I would take a look at the link I posted as it gives a pretty in-depth explanation on how to tune your db based on your expected workloads.
Additionally this blog post explains how it works under the hood if you are interested.