how to fix the issue: "sudo - a password is required" from the task in ansible

after running the task below, I get an error:

- name: "AWS | ECS | Provision service with load balancer"

  become: yes
  become_method: sudo
  become_user: root
  command: "ecs-cli compose --cluster={{ ecs_cluster }} --region={{ aws_region }} --project-name={{ project_name }} --file={{ file_path }} service up --load-balancer-name={{ elb_name }} --container-name={{ container_name }} --container-port={{ container_port }} --role={{ iam_role }}"
  when: elb_name is defined
  environment: "{{ env_variables }}"
  register: ecs_cli_result

fatal: [127.0.0.1]: FAILED! => { "changed": false, "failed": true, "module_stderr": "sudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1 }

does someone has a suggestion?

thanks, Maurice