AWS S3 file upload plugin: an issue in K8s cluster

System Information
  • Strapi Version: 3.5.4
  • Operating System: Ubuntu v?
  • Database: PostgreSQL
  • Node Version: 12.16.1
  • NPM Version: 6.13.4
  • Yarn Version: 1.22.10

AWS S3 file upload via plugin works in 2 steps with Strapi:

  1. Client uploads files from local machine’s file system to /public/uploads folder on one of the instances in cluster using POST request;
  2. CMS sends that file from that instance to S3 via corresponding provider;

In fact this operation seems to be non-transactional over the cluster. Temp file can be created on one instance, but another one tries to send it to S3 (and can not find it obviously).

The issue may not be reproduced each time because sometimes client can be lucky enough to get “one instance” operation sequence. Do I understand the source of the problem right and how to fix it? Thanks in advance.