By default, Fedora persists its OCFL Storage Root on the local filesystem. This guide details how a Fedora installation can optionally be configured to instead persist its OCFL Storage Root to Amazon S3.

The Amazon S3 storage implementation stores OCFL objects directly in an Amazon S3 bucket. Optionally, a key prefix can be used to partition the repository to use only a portion of its bucket, allowing you to store multiple OCFL repositories in the same bucket or non-OCFL content.

Requirements

S3 Bucket

At the minimum, permissions on the bucket must allow the authorized client to perform the following actions:

Database

The OCFL library will by default cache OCFL object details in the database. It only supports PostgreSQL. If you are not using PostgreSQL or do not want to use the database cache, then you can disable it by setting fcrepo.ocfl.s3.db.enabled to false.

Configuration

AWS Credential Configuration

The credentials used to interact with S3 must be available to Fedora per Amazon's guidelines. You can optionally specify them explicitly by setting fcrepo.aws.access-key and fcrepo.aws.secret-key.

Fedora Configuration

The following configuration items are passed to the Fedora application on startup via system properties.

The use of Fedora's S3 feature requires a configuration that selects the storage type to be "ocfl-s3":

-Dfcrepo.storage=ocfl-s3

The AWS region in which the pre-existing S3 bucket can be found is configured as follows. The region codes found in the table provided by Amazon's documentation are all available, such as "us-east-2", "eu-west-1", etc.

-Dfcrepo.aws.region=<bucket-region-code>

The AWS S3 bucket name is provided to Fedora as follows:

-Dfcrepo.ocfl.s3.bucket=<bucket-name>

Optionally, a prefix can be provided to partition the S3 bucket so that Fedora uses only a portion of the bucket.

-Dfcrepo.ocfl.s3.prefix=<some-prefix>

Non-AWS S3 Implementations

The S3 integration should work with non-AWS S3 implementations, but you should test it to make sure it works as expected. In addition to the standard configuration options, you can specify a custom endpoint using fcrepo.s3.endpoint and enable path-style access, if your implementation requires it, using fcrepo.s3.path.style.access.