Cannot figure out why my docker container running on Windows Server 2016 is not able to hit AWS instance metadata endpoint for its host. On Linux I do not encounter these issues with pulling the metadata for the host of the container, however I am a Windows Noob not sure why this isn't working. I've searched for answers, but could not find an answer.
Container is able to ping the internet (8.8.8.8)
PS C:\> invoke-webrequest -uri "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
invoke-webrequest : Unable to connect to the remote server
At line:1 char:1
+ invoke-webrequest -uri "http://169.254.169.254/latest/meta-data/iam/s ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand