访问元数据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
EXPERTO
preguntada hace 6 meses12 visualizaciones
1 Respuesta
0

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

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

profile picture
EXPERTO
respondido hace 6 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas