Failed to invoke procedure `apoc.export.csv.query`: The AWS Access Key Id you provided does not exist in our records

Using Neo4j Browser in Neo4j Desktop 1.6.1 for Windows on my local computer, I try to run the following Cypher query to export local graph data to a bucket on AWS S3:

CALL apoc.export.csv.query(
  "MATCH (n:Person) RETURN n.name AS Name, n.born AS BirthYear",
  $url,
  {batchSize:1000,  quotes:true, header:true}
)
YIELD file, nodes, relationships, properties, time
RETURN file;

But it always returns an error with the following message:

Failed to invoke procedure `apoc.export.csv.query`: Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: CWHN0KMP....

The $url follows the format from the documentation s3://accessKey:secretKey@endpoint:port/bucket/key, in my case it is: s3://<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>@s3.eu-central-1.amazonaws.com:443/<my-bucket-name>/<my-object-file-name>.json.

What am I missing?

1 Like

Hi - I see this has not gotten a reply yet. If this is an issue still, let me see if I can get some more on this.

Have you added the aws jars to your plugins folder?
See

https://neo4j.com/labs/apoc/5/import/web-apis/#_using_s3_protocol

1 Like