Skip to content
Corridor V1.26.08 is out, see what's new

Technology

Amazon S3

Ask AI

How to configure Amazon S3 as the Corridor Platform's file management backend.

When using Amazon AWS, the easiest method to handle files is keeping it an S3 bucket that handles versioning, backups, storage-scale, etc. This allows easy access to the data and also a pay-as-use model to use S3’s elastic storage model.

To use this, we can use the fs-s3fs filesystem available as part of pyfilesystem2. For this, the module fs-s3fs needs to be installed on the components:

  • API Server
  • API - Celery Worker

PyPI Link: https://pypi.org/project/fs-s3fs/

Terminal window
$INSTALL_DIR/venv-api/bin/pip install fs-s3fs

In the API configurations, the following configurations need to be set:

  • FS_URI = 's3://<access_key>:<secret_key>@<bucketname>/<bucketprefix>
    Needs to be set to be able to connect to the Database.
  • Also, check the other configurations that may be required as described in API - Configurations > SQLAlchemy section