S3 issues when trying to create a thumbnail

I am having an issue with writing images to S3. I am finding that it works for a day or so then starts to have errors such as the one below. Restarting the lucee server sorts the issue out until it starts having the same issue again.

The S3 bucket has something like 500k+ files in this particular directory. It has been working fine up until a month or so ago.

Lucee Server: Lucee
OS: Ubuntu 22.04.3 (EC2 Instance)
S3 Resource Extension

lucee.runtime.exp.NativeException: destination folder [ directoryname ] doesn’t exist at org.lucee.extension.image.Image.writeOut(Image.java:1015) at org.lucee.extension.image.functions.ImageWrite.call(ImageWrite.java:62) at org.lucee.extension.image.functions.ImageWrite.invoke(ImageWrite.java:74) at lucee.runtime.functions.

Any help or suggestions would be appreciated.

try the new v2 S3 extension?

the 0.9.4 uses an old library and there’s been a lot of work on the newer v2 version