I'm trying to copy data from AWS S3 to Aurora Postgres. Currently my process is as follows:
COPY FROM STDIN ...
" command to load data from input stream to Aurora postgres. I'm wondering if there is a command to copy directly from S3 to Aurora postgres.
Your database must be running PostgreSQL version 10.7 or higher to import from Amazon S3 into RDS for PostgreSQL. If you don't have data stored on Amazon S3, you need to first create a bucket and store the data. For more information, see the following topics in the Amazon Simple Storage Service User Guide.
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/ . Choose Snapshots. On the Snapshots page, choose the RDS for PostgreSQL snapshot that you want to migrate into an Aurora PostgreSQL DB cluster. Choose Actions then choose Migrate snapshot.
This blog post from AWS mentions being able to do it with AWS Database Migration service
https://aws.amazon.com/blogs/database/stream-data-into-an-aurora-postgresql-database-using-aws-dms-and-amazon-kinesis-data-firehose/
AWS DMS can read data from source S3 buckets and load them into a target database. To do this, provide access to an S3 bucket containing one or more data files. In that S3 bucket, include a JSON file that describes the mapping between the data and the database tables of the data in those files.
The source data files must be in comma-separated value (CSV) format. Name the files using the naming convention shown following. In this convention, schemaName is the source schema and tableName is the name of a table within that schema.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With