This article describes how to setup Magnolia/Jackrabbit to use Amazon S3 as a datastore backend.
This can be helpful for Docker-like deployments. In this type of deployment, it's common to move as much of the content and configuration out of your file system as possible (by default the datastore stores the binaries on the FS). Performance when handling big files should not be affected by using S3.
Add Maven dependency to your project
It will add
jackrabbit-aws-ext library to your project. This library contains necessary classes Jackrabbit uses to store the binaries in the S3.
Add information about your AWS S3 account so Jackrabbit can connect to it.
Configure the Datastore in the Jackrabbit config file
S3DataStore class extends CachingDataStore. This means by default the disk space will be still used to store the cached items. The location can be specified by the
path parameter. Otherwise the repository folder will be used.
The cache can be disabled so the items will always be read from the S3 and no FS is needed. To do so, set
cacheSize parameter to 0.