Migrating Database from Heroku to AWS
If you mean AWS RDS PostgreSQL:
pg_dump
and pg_restore
I know you don't like this, but you have no other options. With a lot of hoop jumping, you could do it with Londiste or Sloni-I on the next EC2, but that would be ... interesting. It's not the most convenient way to do the update, to say the least.
What you should do is send WAL to RDS PostgreSQL and / or thread replication logs. However, Amazon does not support this .
Hopefully Amazon adopts part 9.4 of the logical replication and logical change functionality, or better yet, the BDR project - but I wouldn't say I'm holding my breath.
If you mean AWS EC2
If you are running your own EC2 instance with Pg, use replication , then push fallback to the new master.
source to share