S3 bucket not syncing with Nextcloud

I have recently added an external storage device (S3 bucket) to the Nextcloud instance and it works fine for the most part. If I manually upload a file to the bucket it appears in Nextcloud immediately. However if I upload the file through the AWS S3 PHP library, the file does not appear in the Nextcloud interface.
Is there an additional trigger or something that needs to be done? I’m not sure if this is more of an S3 question or Nextcloud.

Edit: I should add that the files permissions are the same in each instance.