> ## Content Index
> Fetch the complete content index at: https://scriptcrunch.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# ERROR! The ec2 dynamic inventory plugin requires boto3 and botocore.
- URL: https://scriptcrunch.com/ec2-dynamic-inventory-requires-boto3/
- Published: 2021-07-13T04:07:58.000Z
- Updated: 2026-06-23T08:56:03.000Z
- Author: Scriptcrunch Editorial
- Tags: Ansible, #Migrated-1758801465347, #wp, #wp-post, #Import 2025-09-25 11:57

Issue: When trying to set up [Ansible](https://scriptcrunch.com/tag/ansible/) Dynamic inventory, I am getting the following error.

```
ERROR! The ec2 dynamic inventory plugin requires boto3 and botocore.
```

I have installed python3 and boto3\. But still, ansible is throwing an error on boto3.

## \[Solution\] ec2 dynamic inventory plugin requires boto3

This issue normally happens when you install Ansible from Ansible ppa.

To fix these issues you need to install boto3 using the following command.

```
sudo apt-get install python-boto3
```

Once you executed the above command, you can try executing the dynamic inventory again, it will not throw this error.

You might like, [checking application status using Ansible](https://scriptcrunch.com/check-application-status-using-ansible/)