ERROR: putting files in aws s3 bucket using Ansible tower template

Hi,
I am getting below error pushing files to aws s3 bucket using Ansible Tower template. Below is task snippet thats giving me the error. I have the aws access and secret keys attached to the template as credentials. Any pointer would help.

Task snippet:

  • name: push backup to s3
    amazon.aws.s3_object:
    bucket: ansible
    object: backups
    src: /path/to/file
    mode: put
    delegate_to: localhost

Error:

An error occurred (AccessControlListNotSupported) when calling the PutObject operation: The bucket does not allow ACLs",

Hi Vivek

Is the s3 bucket configured to restrict all public access? This looks like more of an AWS resource configuration issue than an AWX/Ansible.

There are quite a few stackoverflow threads discussing possible solutions - just make sure that you understand the implications of making any of the suggested changes to avoid accidentally exposing your bucket to the internet.

Good luck!