First, find the URL to your db on Heroku:
$ heroku config:get DATABASE_URL
postgres://yada:[email protected]:5432/123
Then transfer from the heroku db to your local db:
$ heroku plugins:install https://github.com/ddollar/heroku-pg-transfer
$ heroku pg:transfer -t postgres://localhost/dbname -f postgres://yada:yada@ec2.../123
Since the heroku-pg-transfer tool utilizes postgres's native pg_dump facility it is a much more predictable and resilient tool.
There is a blog post about this: http://www.ryandaigle.com/a/pgtransfer-is-the-new-taps