@phil22 - I’ve worked on a setup similar to what you are proposing and its more subtle that you think:
-
The Discourse team puts out multiple releases a month and so you need to stay with your original version when you clone to your new ec2. Normally its ok to blindly upgrade the app, but some releases include major database upgades (PG 12 → PG 13) and if you don’t track this and neglect to upgrade your external RDS, you might get stuck.
-
We found success in having the ec2 use an EBS volume which is also configured to be mounted inside your app container. Using this, we store all of the /shared folder contents. That way when your ec2 instances come and go, you have all of this shared folder content persisted on EBS. Further, sometimes you change your mind about storing files in s3. Having an alternative place to store uploaded files (like the /shared folder) is good in that case.
Hope this helps