how to download a file from ec2 instance to local machine code example Example: ec2 download file scp -i ec2key.pem username@ec2ip:/path/to/file .