title: How can I transfer a remote file to my S3 bucket using AWS CLI?
body: <p>I tried to follow advice provided at <a href="https://stackoverflow.com/a/18136205/6608952">https://stackoverflow.com/a/18136205/6608952</a> but was unsure how to share myAmazonKeypair path in a .pem file on the remote server.</p>
  
  <pre><code>scp -i yourAmazonKeypairPath.pem  fileNameThatYouWantToTransfer.php ec2-user@ec2-00-000-000-15.us-west-2.compute.amazonaws.com:
  </code></pre>
  
  <p>The command completed after a few minutes with this display:</p>
  
  <blockquote>
    <p><code>ssh: connect to host</code> <br>
       <code>myBucketEndpointName</code><br>
       <code>port 22: Connection timed out</code><br>
       <code>lost connection</code><br></p>
  </blockquote>
  
  <p>I have a couple of very large files to transfer and would prefer not to have to download the files to my local computer and then re-upload them to the S3 bucket.</p>
  
  <p>Any suggestions?</p>