根据文档测试即可:
https://docs.amazonaws.cn/AmazonRDS/latest/UserGuide/USER_PostgreSQL.S3Import.html
postgres=> create extension aws_s3 cascade;
NOTICE: installing required extension "aws_commons"
CREATE EXTENSION
postgres=> SELECT aws_commons.create_s3_uri(
postgres(> '<yours3bucket>',
postgres(> 'test.csv',
postgres(> 'cn-north-1'
postgres(> ) AS s3_uri \gset
postgres=>
postgres=> SELECT aws_s3.table_import_from_s3(
postgres(> 'test',
postgres(> 'a,b,c,d',
postgres(> 'DELIMITER ''|''',
postgres(> aws_commons.create_s3_uri('<yours3bucket>', 'test.csv', 'cn-north-1')
postgres(> );
table_import_from_s3
---------------------------------------------------------------------
4 rows imported into relation "test" from file test.csv of 88 bytes
(1 row)
postgres=> select * from test;
a | b | c | d
---+------+------+-----------
1 | foo1 | bar1 | elephant1
2 | foo2 | bar2 | elephant2
3 | foo3 | bar3 | elephant3
4 | foo4 | bar4 | elephant4
(4 rows)