Error "msg": "boto3 required for this module" when running a job template using amazon.aws.ec2_instance_info module

Solution Verified - Updated -

Environment

  • Ansible Automation Platform 2.x.

Issue

  • When running a job template which is using amazon.aws.ec2_instance_info module , the job failed with error :
Error "msg": "boto3 required for this module"

Resolution

  • Add ansible_python_interpreter variable to extra variables for each template using this module.
"ansible_python_interpreter": "/usr/bin/python3.8"

Root Cause

  • Wrong python_interpreter is used when the job is executed.

Diagnostic Steps

  • Check if boto modules are installed on the EE image:
pip3 list | grep boto
            "boto                           2.47.0",
            "boto3                          1.9.223",
            "botocore                       1.12.253"

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments