I have an S3 bucket connected to NC (12.0.5) as an external storage.
I can create files/folders from NC interface also I can create from S3 console and I can see it in NC.
But when I tried to copy or sync some files via aws-cli to bucket I cant see them in NC.
All settings and permissions from AWS side are correct. Also I got error in NC:
Invalid argument supplied for foreach() at /usr/share/nginx/nextcloud/apps/files_external/lib/Lib/Storage/AmazonS3.php#291
Yes, I am having similar issue. I copied files and folders directly from my old file server to S3 via aws cli. NC only display files on the first directory level. Any folders and files in those folders are not shown. When I manually create those folders from NC interface, I can see its content right away.
It seems that NC does not refresh folder listing properly in this case.