Last month in Ansible Berlin meetup, I had a session about my experience with writing an external inventory script from scratch for Netbox (IPAM and DCIM tool from DigitalOcean network engineering team) and push it to upstream to became an official inventory script.
I did speak about the whole experience. I opened the PR on Feb 2017 and approved on Oct 2017, and it has been reviewed by Ansible community (6 peoples were involved). And the most important part IMHO was the tips & tricks section.
The "Dynamic inventory" is one of nice features in Ansible, where you can use an external service as inventory for Ansible instead the basic text-based ini file. So you can use AWS EC2 as inventory of your hosts, or maybe OpenStack, or whatever ... you actually can use any source inventory for Ansible, and you can write your own "External Inventory Script".