Page tree
Skip to end of metadata
Go to start of metadata

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.


Create file

Add information about your AWS S3 account so Jackrabbit can connect to it.

# AWS account ID
# AWS secret key
# AWS bucket name
# AWS bucket region
# S3 endpoint to be used. This parameter is optional
# and has a higher precedence over endpoint derived
# via S3 region.
# Recommended to set as the URL constructed from the info above might not be correct. The format is
# maximum concurrent threads to write to S3.
# proxy configurations (optional)

Configure the Datastore in the Jackrabbit config file

<DataStore class="">
  <param name="config" value="/path/to/your/"/>

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.

<param name="path" value="/path/where/you/want/the/s3/cache/stored"/>

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.

<param name="cacheSize" value="0"/>