ZJAY
ZJAY

Reputation: 2827

Unload from Redshift to S3: Authentication not working

I am using the following script:

UNLOAD ('SELECT * FROM table WHERE
UPPER(description) LIKE \'%something%\' AND
transaction_date=\'2014-01-01\'')
TO 's3://yourdirectory/jan14.txt' CREDENTIALS 
'aws_access_key_id=xxxx;
aws_secret_access_key=xxx'
PARALLEL OFF

But it returns this error:

An error occurred when executing the SQL command: UNLOAD ('SELECT * FROM yi_base_views.card_panel WHERE UPPER(description) LIKE \'%LULULEMON%\' AND transaction_date=\'2014-01-01\'') TO 's3://yourdirec...

ERROR: Invalid credentials. Must be of the format: credentials 'aws_access_key_id=;aws_secret_access_key=[;token=]' Detail:


error: Invalid credentials. Must be of the format: credentials 'aws_access_key_id=;aws_secret_access_key=[;token=]' code: 8001 context:
query: 0 location: aws_credentials_parser.cpp:59 process: padbmaster [pid=43295]


Upvotes: 1

Views: 964

Answers (1)

Paladin
Paladin

Reputation: 630

Remove the line break between the access key and secret key and it should work.

Upvotes: 1

Related Questions