I've been trying to load data into Redshift
for the last couple of days with no success. I have provided the correct IAM
role to the cluster, I have given access to S3
, I am using the COPY
command with either the AWS
credentials or the IAM
role and so far no success. What can be the reason for this? It has come to the point that I don't have many options left.
So the code is pretty basic, nothing fancy there. See below:
copy test_schema.test from 's3://company.test/tmp/append.csv.gz'
iam_role 'arn:aws:iam::<rolenumber>/RedshiftCopyUnload'
delimiter ',' gzip;
I didn't put any error messages because there are none. The code simply hangs and I have left it running for well over 40 minutes with no results. If I go into the Queries section in Redshift I dont see any abnormal. I am using Aginity and SQL Workbench to run the queries.
I also tried to manually insert queries in Redshift and seems that works. COPY and UNLOAD do not work and even though I have created Roles with access to S3 and associated with the cluster I still get this problem.
Thoughts?
EDIT: Solution has been found. Basically it was a connectivity problem within our VPC. A VPC endpoint had to be created and associated with the subnet used by Redshift.
COPY
command you are using, the error message you are receiving, plus any other information that would help us to try and diagnose/reproduce your situation. – John Rotenstein