postgresql - 将数据从 AWS S3 复制到 Aurora Postgres

标签 postgresql amazon-s3 amazon-aurora

我正在尝试将数据从 AWS S3 复制到 Aurora Postgres。目前我的流程如下:

  1. 从 S3 本地下载文件(在 EC2 实例上)
  2. 运行“COPY FROM STDIN ...”命令将数据从输入流加载到 Aurora postgres。

我想知道是否有直接从 S3 复制到 Aurora postgres 的命令。

最佳答案

这篇来自 AWS 的博客文章提到能够使用 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.

关于postgresql - 将数据从 AWS S3 复制到 Aurora Postgres,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43149413/

相关文章:

php - PostGreSQL 使用 PDO PHP 创建表

sql - PostgreSQL:我想知道 'cast'的区别

amazon-web-services - 如何使用通配符从 aws s3 中选择文件

python - 获取 botocore.exceptions.NoCredentialsError : Unable to locate credentials especially when I using CronTab

mysql - SQL - 对另一个查询的结果执行查询?

Postgresql:选择不同条件的总和

postgresql - 有没有办法设置一个选项,即使出现错误也会导致 PostgreSQL 脚本继续?

c++ - 如何在 C++ 中隐藏我的 AWS S3 访问 key 和 secret ?

mysql - 与 RDS MySQL/Aurora 无服务器集群的 SSL 连接因 Node.js 而失败

mysql - 如果可能的话,如何诊断长时间运行的事务并保存数据?