从 Redshift 卸载到 S3 失败

eis*_*ati 2 mysql amazon-s3 data-dump amazon-redshift

我在 Redshift 中运行以下命令:

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

这是我得到的回复:

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]
-----------------------------------------------
Run Code Online (Sandbox Code Playgroud)

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

Tom*_*icz 5

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

  • 换句话来说:Redshift 集群和 S3 存储桶必须位于同一区域:) (2认同)