Ansible module that provides ec2 metadata from within a running instance (in ec2)
Run as ansible ec2-host -m ec2_facts
There is a basic playbook included into playbook.yaml
Change the host from the playbook accordingly and run as ansible-playbook playbook.yaml