2 Answers
- Newest
- Most votes
- Most comments
3
With imds v2 you have to grab an authorisation token first before you can access the metadata otherwise you will receive the 401 error.
Follow the Linux or windows example in the link
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-metadata-v2-how-it-works.html
1
Hi,
You can only access EC2 instance metadata via CURL from the inside of the instance itself.
Best,
Didier
Relevant content
- asked 2 years ago
- asked 2 months ago

The article above only works with imdsv1