2014-07-21 37 views
6

我正在使用在page上找到的数据来练习复制命令。Amazon RedShift复制命令

但我得到一个异常

org.postgresql.util.PSQLException: 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 8D10A2C0B9C7570E,ExtRid VTQZsFdP8DRiJPza+Ko4bc2Y91P9Wra0Qb9C 
    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 8D10A2C0B9C7570E,ExtRid VTQZsFdP8DRiJPza+Ko4bc2Y91P9Wra0Qb9C 
    code:  8001 
    context: Listing bucket=awssampledb prefix=tickit/allusers_pipe.txt 
    query:  576 
    location: s3_utility.cpp:525 
    process: padbmaster [pid=4283] 

我到底做错了什么?

回答

10

的S3桶和红移必须在同一区域(US东):

本例使用一个Amazon S3桶,其位于美国东(北弗吉尼亚)区。使用COPY命令加载数据时,包含数据的存储区必须与群集位于同一区域。

如果你的红移集群是在另一个区域,看Step 5: Load Sample Data from Amazon S3,滚动到表区域专用桶名称

 
------------------------------+-------------------------------+ 
| Region      | region-specific-bucket-name | 
------------------------------+-------------------------------+ 
| US East (Northern Virginia) | awssampledb     | 
------------------------------+-------------------------------+ 
| US West (Oregon)   | awssampledbuswest2   | 
------------------------------+-------------------------------+ 
| EU (Ireland)    | awssampledbeuwest1   | 
------------------------------+-------------------------------+ 
| Asia Pacific (Singapore) | awssampledbapsoutheast1  | 
------------------------------+-------------------------------+ 
| Asia Pacific (Sydney)  | awssampledbapsoutheast2  | 
------------------------------+-------------------------------+ 
| Asia Pacific (Tokyo)  | awssampledbapnortheast1  | 
------------------------------+-------------------------------+ 
-1

的S3存储和红移都应该在同一地区。如果不是,则需要在复制命令中指定区域选项,然后加载将正常工作。

+0

它不工作! –