1

I have Windows EC2 and trying to fetch metadata

Invoke-RestMethod -uri http://169.254.169.254/latest/meta-data/

Invoke-RestMethod : Unable to connect to the remote server
At line:1 char:1
+ Invoke-RestMethod -uri http://169.254.169.254/latest/meta-data/
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

How can I see the the metadata of EC2 instance?

user829174
  • 6,132
  • 24
  • 75
  • 125

1 Answers1

1

running InitializeInstance.ps1 on the EC2 instance fixed the problem

user829174
  • 6,132
  • 24
  • 75
  • 125