0

I try to bulk import into a cockroach db from a S3 bucket in the eu-west-1 region

IMPORT TABLE osm.nodes (
        id INT PRIMARY KEY,
        version INT NOT NULL,
        lat DECIMAL NOT NULL,
        lon DECIMAL NOT NULL,
        changeset_id INT NOT NULL,
        visible BOOLEAN NOT NULL
    )
    CSV DATA ('s3://cockroach-import/nodes.csv?AWS_ACCESS_KEY_ID=<snip>&AWS_SECRET_ACCESS_KEY=<snip>')
    WITH
        temp = 's3://cockroach-import/?AWS_ACCESS_KEY_ID=<snip>&AWS_SECRET_ACCESS_KEY=<snip>',
        delimiter = ','
    ;

I get the error message:

failed to create s3 reader: 400: "The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-west-1'"

How can I specify the S3 region in the import statement?

gubaer
  • 236
  • 2
  • 11

1 Answers1

1

This is a bug that has been fixed in the upcoming release of Cockroach 1.1.2. https://github.com/cockroachdb/cockroach/issues/19435 describes the problem and fix.

mjibson
  • 16,852
  • 8
  • 31
  • 42