How to retain images folder while publishing on Elastic Beanstalk?
You shouldn't be storing uploaded images to the disk volume on your Elastic Beanstalk server. That disk volume will be deleted when your server is replaced due to deployments or AWS server maintenance. Plus, how would this work if you needed to scale up your Elastic Beanstalk environment to 2 or more servers? Only one server would have the image file.
The common solution for this issue is to store the files on S3.
The uploaded images are getting overridden every time when a new version of the application is deployed on to Elastic Beanstalk.
I am deploying Django application and I think I need to do something with the YAML config files but not sure about it.
My application has an Image upload feature for the client. Whenever I publish the new version of the application the old one is overwritten along with the removal of the images under the image folder.