I'm fairly new to AWS in general. I'm currently trying to replicate work by another group and therefore am attempting to mimic their setup. I've established an EC2 instance (Amazon Linux AMI) and a PostgreSQL 9.3.5 RDS instance. I've uploaded a 4 GB csv file to EC2 and would like to copy it to a table in my RDS db. I used the following code within the EC2 shell (following 2nd set of instructions here):
psql -h XX.us-west-2.rds.amazonaws.com -U username -d DBname -p 5432 -c "\copy tablename from 'data.csv' with DELIMITER ',';"
After giving my password I get the error "psql: FATAL: could not write init file". I think this psql client may be version 9.2, is that something that matters? Or is this the wrong syntax for this type of transfer? Or, could it be related to having free trial size instances, which I believe have a 5 GB limit? I think I should be under that limit, but would it tell me if that were the problem? Any help would be much appreciated.