With an S3 service ready to use (either as a private Minio installation, or directly on AWS), it can now be used to store transcoded audio files instead of storing them directly on a filesystem. Amazon provides an SDK to use many AWS services from Python (S3, EC2, Elasticsearch, and so on). This SDK is open-source (https://github.com/boto/boto3), and available on PyPI in the boto3 package. This is the package that will be used to store the encoded files in the S3 database.
Several evolutions are needed to use S3 storage instead of the local filesystem:
- Implementing an S3 driver
- Returning FLAC data in the encode driver
- Adding S3 information in the configuration file
- Using the new driver in the application
These evolutions mainly consist of using a new driver in the application. So, the reactivity diagram of the application evolves to the following example...