Am new to AWS ,I have CSV file in amazon S3, now I want to read and import the CSV file in to aws postgres table using java.
I know we can use the below commands in CLI,
aws s3 cp s3://bucket/file.csv /mydirectory/file.csv
psql -h your_rds.amazonaws.com -U username -d dbname -c '\COPY table FROM ''file.csv'' CSV HEADER'
But I need to run it in java.
Can anyone please suggest me any solution.