title: Ansible aws s3 fails on directory checksuom when getting an object
body: <p>when getting an object from an S3 bucket using the following Ansible command:</p>
  
  <pre><code>- name: "copy object from s3://{{ s3_bucket }}/{{ s3_object }} to {{ dest }}"
    s3:
      bucket: "{{ s3_bucket }}"
      object: "{{ s3_object }}"
      dest: "{{ dest }}"
      mode: get
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>fatal: [som_fake_host]: FAILED! =&gt; {
      "changed": false,
      "failed": true,
      "invocation": {
          "module_args": {
              "aws_access_key": null,
              "aws_secret_key": null,
              "bucket": "some-fake-bucket",
              "dest": "/some-fake-dest/",
              "ec2_url": null,
              "encrypt": true,
              "expiry": "600",
              "headers": null,
              "ignore_nonexistent_bucket": false,
              "marker": null,
              "max_keys": "1000",
              "metadata": null,
              "mode": "get",
              "object": "some_fake_file",
              "overwrite": "always",
              "permission": [
                  "private"
              ],
              "prefix": null,
              "profile": null,
              "region": null,
              "retries": 0,
              "rgw": false,
              "s3_url": null,
              "security_token": null,
              "src": null,
              "validate_certs": true,
              "version": null
          }
      },
      "msg": "attempted to take checksum of directory: /some-fake-dest/"
  }
  </code></pre>
  
  <p>additional useful information:</p>
  
  <ul>
  <li>The destination directory exists  </li>
  <li>The user that runs the playbook has permission on the destination directory</li>
  <li>The file exists in S3 bucket  </li>
  </ul>