- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
Hi Neohed, Try running below command, i see there is a good possibility you might miss the instance-id as it gets printed immediately before shell prompt.
curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/instance-id && echo ""
Hi, The GET Api call represented in 3rd line of response is "> GET /latest/meta-data/instance-id HTTP/1.1" and i suspect that the URI is incorrect. Maybe you did a typo with your actual execution. If you had executed "curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/" as the command the API call should be made as "> GET /latest/meta-data/ HTTP/1.1".
Yes, you are correct, well spotted. I did indeed include the wrong command. When I run curl for "/latest/meta-data/" it works and I get a list of all available meta data. When I append a meta-data attribute name to the URL and try again, e.g., in my screenshot below, then I get this response.
@Abhishek Thanks for replying. I have tried these commands again and taken a screenshot:
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 5 Monaten
- AWS OFFICIALAktualisiert vor einem Jahr
You're spot on mate. Thanks so much - that's brilliant! It worked perfectly.