I would rethink why your application is storing things to the local system to begin with. Having those files removed on deploys is only one problem. Another problem is that when your app scales to more than one instance, those instances will not know about any of the files on the other instances. It would be best to have your app use S3 for all of your storage, or use some other mechanism that is permanent and accessible from any instance that is running your app.
Another thing to think about is user sessions. If you were previously storing sessions on the server, then you need to do something different there as well. Once there is more than one instance of your app running, session data will be unreliable unless you store it somewhere accessible by all of the instances. Elasticache or DynamoDB might be good options for session storage.