从Redshift卸载到S3失败

时间:2014-02-13 17:29:47

标签: mysql amazon-s3 amazon-redshift data-dump

我在Redshift中运行以下命令:

myDB=> unload ('select * from (select * from myTable limit 2147483647);')
       to 's3://myBucket/'
       credentials 'aws_access_key_id=***;aws_secret_access_key=***';

以下是我的回复:

ERROR:  S3ServiceException:The bucket you are attempting to access must be addressed
        using the specified endpoint. Please send all future requests to this 
        endpoint.,Status 301,Error PermanentRedirect,Rid 85ACD9FFAFC5CE8F,
        ExtRid vsz4/0NdOAYbaJ48WYCnrYBCvuuL0cBTdcEN

DETAIL:  
-----------------------------------------------
error:  S3ServiceException:The bucket you are attempting to access must be addressed
        using the specified endpoint. Please send all future requests to this 
        endpoint.,Status 301,Error PermanentRedirect,Rid 85ACD9FFAFC5CE8F,
        ExtRid vsz4/0NdOAYbaJ48WYCnrYBCvuuL0cBTdcEN
code:      8001
context:   Listing bucket=myBucket prefix=
query:     0
location:  s3_unloader.cpp:181
process:   padbmaster [pid=19100]
-----------------------------------------------

有什么想法?或者也许想法如何将数据从Redshift转储到MySQL或类似的东西?

2 个答案:

答案 0 :(得分:4)

在非US存储桶中使用类似路径的语法时会返回错误消息。在与红移群集相同的区域中创建一个新存储桶,一切都应该有效。

答案 1 :(得分:-1)

您缺少文件名的前缀部分。尝试使用s3:// myBucket / myPrefix