redshift UNLOAD命令出错

时间:2018-01-18 09:34:11

标签: amazon-s3 amazon-redshift

我正在尝试将Redshift表卸载到S3存储桶,但是我遇到了无法解决的错误。

当使用's3://mybucket/'作为目的地时(这是指定目的地的记录方式),我发送错误S3ServiceException:The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

经过一些研究后,我尝试将目的地更改为包含完整的存储桶网址,但没有成功。

所有这些目的地:

  • 's3://mybucket.s3.amazonaws.com/'
  • 's3://mybucket.s3.amazonaws.com/myprefix'
  • 's3://mybucket.s3.eu-west-2.amazonaws.com/'
  • 's3://mybucket.s3.eu-west-2.amazonaws.com/myprefix'

返回此错误S3ServiceException:The authorization header is malformed; the region 'eu-west-2' is wrong; expecting 'us-east-1',这也是我使用不存在的存储桶名称时返回的错误。

我的Redshift群集和我的s3存储桶都存在于同一区域eu-west-2

我做错了什么?

[附录]

完整命令:

UNLOAD ('select * from mytable')
to 's3://mybucket.s3.amazonaws.com/'
iam_role 'arn:aws:iam::0123456789:role/aws-service-
role/redshift.amazonaws.com/AWSServiceRoleForRedshift'

完整错误:

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 6ADF2C929FD2BE08,ExtRid vjcTnD02Na/rRtLvWsk5r6p0H0xncMJf6KBK
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 6ADF2C929FD2BE08,ExtRid vjcTnD02Na/rRtLvWsk5r6p0H0xncMJf6KBK
  code:      8001
  context:   Listing bucket=mybucket prefix=
  query:     0
  location:  s3_unloader.cpp:226
  process:   padbmaster [pid=30717]
  -----------------------------------------------

ERROR:  S3ServiceException:The authorization header is malformed; the region 'eu-west-2' is wrong; expecting 'us-east-1',Status 400,Error AuthorizationHeaderMalformed,Rid 559E4184FA02B03F,ExtRid H9oRcFwzStw43ynA+rinTOmynhWfQJlRz0QIcXcm5K7fOmJSRcOcHuVlUlhGebJK5iH2L
DETAIL:
  -----------------------------------------------
  error:  S3ServiceException:The authorization header is malformed; the region 'eu-west-2' is wrong; expecting 'us-east-1',Status 400,Error AuthorizationHeaderMalformed,Rid 559E4184FA02B03F,ExtRid H9oRcFwzStw43ynA+rinTOmynhWfQJlRz0QIcXcm5K7fOmJSRcOcHuVlUlhGebJK5iH2L
  code:      8001
  context:   Listing bucket=mybucket.s3.amazonaws.com prefix=
  query:     0
  location:  s3_unloader.cpp:226
  process:   padbmaster [pid=30717]
  -----------------------------------------------

Bucket zone

Cluster zone

0 个答案:

没有答案