1 回答
- 最新
- 投票最多
- 评论最多
0
I’m seeing that this is related to IMDSv1 being disabled on my machines and that I need to either enable it or—better—use IMDSv2, which requires tokens, e.g.,
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"`
LOCAL_HOST_IP =`curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/local-ipv4`
Docs for IMDSv2 https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
已回答 3 年前
相关内容
- AWS 官方已更新 9 个月前
- AWS 官方已更新 3 年前
- AWS 官方已更新 10 个月前
- AWS 官方已更新 1 年前