Export data to S3

To export to S3, the APOC AWS dependency jar needs to be downloaded and copied into the plugins directory, <NEO4J_HOME>/plugins.

AWS dependency jar APOC version

apoc-aws-dependencies-5.15.jar

5.15

apoc-aws-dependencies-5.14.jar

5.14

apoc-aws-dependencies-5.13.jar

5.13

apoc-aws-dependencies-5.12.jar

5.12

apoc-aws-dependencies-5.11.jar

5.11

apoc-aws-dependencies-5.10.jar

5.10

The APOC AWS dependency jar is maintained by the APOC Extended library. This library is not supported by Neo4j.

After copying the jars into the plugins directory, the database will need to be restarted.

By default exporting to S3 is disabled. We can enable it by setting the following property in apoc.conf:

apoc.conf
apoc.export.file.enabled=true

If we try to use any of the export procedures without having first set this property, we’ll get the following error message:

Failed to invoke procedure: Caused by: java.lang.RuntimeException: Export to files not enabled, please set apoc.export.file.enabled=true in your apoc.conf. Otherwise, if you are running in a cloud environment without filesystem access, you can use the {stream:true} config and null as a 'file' parameter to stream the export back to your client.

Using S3 protocol

The S3 URL must be in the following format:

  • s3://accessKey:secretKey[:sessionToken]@endpoint:port/bucket/key (where the sessionToken is optional) or

  • s3://endpoint:port/bucket/key?accessKey=accessKey&secretKey=secretKey[&sessionToken=sessionToken] (where the sessionToken is optional) or

  • s3://endpoint:port/bucket/key if the accessKey, secretKey, and the optional sessionToken are provided in the environment variables

Memory Requirements

To support large uploads, the S3 uploading utility may use up to 2.25 GB of memory at a time. The actual usage will depend on the size of the upload, but will use a maximum of 2.25 GB.