We had a very odd issue recently and it turned out to be caused by the long DNS record for packages.elastic.co.
The beats.repo uses that URL. During yum installs the DNS lookup would hang.
Turns out there is a limit on DNS UDP packets to 512 bytes. The response seemed to break that limit. DNS would normally then try TCP, but we did not have TCP port 53 open in our security.
The solutions was to enable TCP on port 53.
This is the DNS record response as of today 5/2/17. It is 637 bytes. Apparently this is longer that is was a few days ago when it all worked.
getent ahosts packages.elastic.co
22.214.171.124 STREAM dualstack.download-colb-770446651.us-east-1.elb.amazonaws.com