Dumping MySQL databases on Amazon VPC through a bastion host

I needed to dump a MySQL database on a private Amazon VPC node, which was only accessible through an SSH bastion host.

Additionally, I only had read access on the private VPC node, so I wanted to run scripts and store data exclusively on the client.