title: I can't manage files from s3 using ansible aws_s3 module
body: <p>Running the following task on my playbook:</p>
  <pre><code>- name: &quot;Check if hold file exists...&quot;
    amazon.aws.aws_s3:
      region: &lt;region&gt;
      bucket: &lt;bucket&gt;
      prefix: &quot;hold_jobs_{{ env }}&quot;
      mode: list
    register: s3_files
  </code></pre>
  <p>I Got the following error:</p>
  <pre><code>{
      &quot;exception&quot;: &quot;Traceback (most recent call last):\n  File \&quot;/tmp/ansible_amazon.aws.aws_s3_payload_b92r42e3/ansible_amazon.aws.aws_s3_payload.zip/ansible_collections/amazon/aws/plugins/modules/aws_s3.py\&quot;, line 427, in bucket_check\n  File \&quot;/var/lib/awx/venv/ansible/lib/python3.6/site-packages/botocore/client.py\&quot;, line 357, in _api_call\n    return self._make_api_call(operation_name, kwargs)\n  File \&quot;/var/lib/awx/venv/ansible/lib/python3.6/site-packages/botocore/client.py\&quot;, line 661, in _make_api_call\n    raise error_class(parsed_response, operation_name)\nbotocore.exceptions.ClientError: An error occurred (400) when calling the HeadBucket operation: Bad Request\n&quot;,
      &quot;boto3_version&quot;: &quot;1.9.223&quot;,
      &quot;botocore_version&quot;: &quot;1.12.253&quot;,
      &quot;error&quot;: {
          &quot;code&quot;: &quot;400&quot;,
          &quot;message&quot;: &quot;Bad Request&quot;
      }
  </code></pre>
  <p>I am using this configuration:</p>
  <pre><code>    ansible [core 2.11.7]
    config file = /etc/ansible/ansible.cfg
    configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
    ansible collection location = /var/lib/awx/.ansible/collections:/usr/share/ansible/collections
    executable location = /usr/local/bin/ansible
    python version = 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
    jinja version = 2.10.1
    libyaml = True
  </code></pre>
  <p>I need help to solve this, thanks in advance. For this moment I am using a paliative solution, with shell module.</p>