Configuration

S3 file storage support for Invenio.

invenio_s3.config.S3_ACCESS_KEY_ID = None

The access key to use when creating the client.

This is entirely optional, and if not provided, the credentials configured for the session will automatically be used. See Configuring Credentials. for more information.

invenio_s3.config.S3_DEFAULT_BLOCK_SIZE = 5242880

Default block size value used to send multi-part uploads to S3. Typically 5Mb is minimum allowed by the API.

invenio_s3.config.S3_ENDPOINT_URL = None

S3 server URL endpoint.

If using Amazon AWS S3 service this config variable can be set to None as the underlining library, boto3, will automatically construct the appropriate URL to use when communicating with a service.

If set to a value (including the “http/https” scheme) it will be passed as endpoint_url to boto3 client.

invenio_s3.config.S3_MAXIMUM_NUMBER_OF_PARTS = 10000

Maximum number of parts to be used. See AWS Multipart Upload Overview for more information.

invenio_s3.config.S3_REGION_NAME = None

S3 region name

This is entirely optional, and if not provided, the region name will be automatically set to ‘us-east-1’.

If set to a value it will be passed as region_name to boto3 client.

invenio_s3.config.S3_SECRET_ACCESS_KEY = None

The secret key to use when creating the client.

This is entirely optional, and if not provided, the credentials configured for the session will automatically be used. See Configuring Credentials. for more information.

invenio_s3.config.S3_SIGNATURE_VERSION = 's3v4'

Version of the S3 signature algorithm. Can be ‘s3’ (v2) or ‘s3v4’ (v4). See Amazon Boto3 documentation on configuration variables for more information.

invenio_s3.config.S3_URL_EXPIRATION = 60

Number of seconds the file serving URL will be valid.

See Amazon Boto3 documentation on presigned URLs for more information.