title: An error occurred (404) when calling the HeadObject operation: Key "" does not exist
body: <p>I am using the terminal to copy a file from an s3 bucket to my local machine but I keep getting the error:</p>
  <pre><code>fatal error: An error occurred (404) when calling the HeadObject operation: Key &quot;file_000&quot; does not exist 
  </code></pre>
  <p>I am using the command:</p>
  <pre><code>usr/local/bin/aws s3 cp s3://{bucket}/file_000 /Users/user/Documents/Docs/dir/new_file.csv
  </code></pre>
  <p>I know the file exists using:</p>
  <p><code>aws s3 ls s3://{bucket} --recursive --human-readable</code></p>
  <p>and shows up as:</p>
  <p><code>2022-08-04 15:53:12   21.2 MiB  file_000</code></p>
  <p>I have tried adding <code>--recursive</code> to the end of the command. The command goes through but then creates an empty directory named <code>new_file.csv</code></p>
  <p>Is there anything I can do to solve this?</p>