File Storage Design
Medical records may come in a variety of formats, including various document types and images. It will not always be useful or performant to extract and structure the information contained in those records. This is where the document storage component comes in. The purpose of the document storage component is to securely and persistently store any files a user uploads to the system (FR-6 FR-7 and NR-7).
The file storage component occupies the lowest tier of our architecture. This is important, because it means the document store will only be accessible internally from the REST API. Amazon S3 is an easy choice for the file storage component. This product is affordable, well supported, mature, and easy to configure. Each file uploaded the system can be dumped to an S3 bucket and related to an entity within the database component. S3 provides the necessary security controls to ensure the data is only accessed by our REST API.
In addition to using Amazon S3 for the file storage component, we can also make use of S3 for storing backups of all of the data (database and files). Data backups may be automated using tools provided by AWS (NR-8) and stored privately in separate S3 buckets (NR-9).