Facter version 2.4.6 uses the openuri mixin, which is affected by the ENV['http_proxy'] setting.
It retrieves EC2 metadata by contacting the metadata server at 169.254.169.254. If ENV['http_proxy'] is set, facter will wind up retrieving the metadata of the proxy server rather than its own metadata.
To avoid this, calls to open must include the :proxy => nil modifier. In fact, some of the metadata calls have this modifier, but not all.
I have submitted PR 1532 to resolve this problem.