We are running a Heroku app built on Rails 6.2 with Postgres and Reddis. For some of the processes we need to run, we must keep a proper persistent file system. AWS S3 will not work for our needs. Please note that this is not about replacing the Postgress or Reddis functionalities. Is there a recommended way of integrating a Heroku rails app with a persistent file system? I can see a couple of options but maybe there are better ones:
[1] spawn an AWS EC2 instance to keep a proper persistent file system and run the process that requires it there. Then open the AWS EC2 API end-point to the Rails app running on Heroku.
[2] From the Heroku rails app call an AWS Lambda function to run the process in question and let the AWS Lambda function connect with AWS EFS.
Any other options or experiences worth considering?