2014-07-21 181 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

它不工作! –

相關問題