访问元数据API时,返回 401-未经授权的错误。

0

【以下的问题经过翻译处理】 我是 AWS 的新手,我创建了一个 EC2 实例并尝试使用来自 EC2 实例的元数据 API 并收到以下错误。我检查了服务器时间,并按照论坛中的建议重新启动了实例。不确定我做错了什么。任何帮助将不胜感激谢谢!

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
 <head>
  <title>401 - 未经授权</title>
 </head>
 <body>
  <h1>401 - 未经授权</h1>
 </body>
</html>

profile picture
EXPERT
demandé il y a 6 mois12 vues
1 réponse
0

【以下的回答经过翻译处理】 可能是因为您的实例正在使用元数据服务的V2版本。请查看此处,以了解如何获得令牌并将其与查询一起传递。

参考: Add defense in depth against open firewalls, reverse proxies, and SSRF vulnerabilities with enhancements to the EC2 Instance Metadata Service

profile picture
EXPERT
répondu il y a 6 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions