This has to use an external service, since its purpose is querying your external facing IP address, even if you're behind a NAT. They could have used
ifconfig.me instead, though, since that's another service. Depends on whether they trust the permanence of the owner of that domain, versus the permanence of Amazon Web Services running their own IP query service.
I do agree, however, that it may be required to host this tiny script on a Github repository or a Gist on Github, rather than using the AUR to host it. Even if it is under 1 KiB.