mercredi 27 mai 2015

Copy error Amazon Redshift loading from S3

Very new to AWS and RedShift, so please go slow. I'm trying to figure out how to load data from a csv file I uploaded to S3 into a Redshift cluster. I managed to create the required table already, but when I try to run the Copy command to load the data from S3 into the table (using SQLWorkbench), I get the following error;

Invalid operation: S3ServiceException:The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

Some Googling will tell you that this means that the S3 bucket and the Redshift cluster are not in the same region. However, both the cluster and the bucket reside in region ap-southeast-1 (Singapore). Specifying the REGION command with this region code doesn't help and the same error returns.

The copy command I have:

copy dim_products
from 's3://s3-ap-southeast-1.amazonaws.com/dwh-dimensions/dim-products/dim_products.csv' 
CREDENTIALS 'aws_access_key_id=removed;aws_secret_access_key=removed' delimiter ';' 
timeformat 'YYYY-MM-DD HH:MI:SS'
csv
REGION 'ap-southeast-1';

The zone for my redshift cluster is ap-southeast-1b, so that would be the same region as the bucket (Singapore). I'm at a loss here, and I need to present this soon as a viable data warehouse solution to management. Any help would be greatly appreciated. Thanks.




Aucun commentaire:

Enregistrer un commentaire