With execution environments this maybe harder to guess at than before.
For starters I’d ask the following;
What version of Ansible are you running in your execution environment?
Per the docs at https://docs.ansible.com/ansible/latest/collections/community/aws/ec2_eip_module.html:
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
Can you check and see if the community.general collection is installed in your EE.
Do you have a requirements.yml that is supposed to be pulling the collection in on the project sync? If so, were there any issues with the project sync? If not, can you confirm that the collection is downloaded?