Currently IamAwsProvider accepts providing a custom endpoint of IMDS service. It's great for testing, but in my opinion could be further improved by allowing the class'es client to provide a custom port as well. Currently in order to setup a local testing environment the user needs to set up a mock endpoint listening on port 80, which is sometimes not acceptable (eg. collides with other services).
Let me know if you're interested in such a feature. If so, i'll prepare a PR