简体   繁体   English

通过 AWS 请求 ID 获取请求参数

[英]Get request parameters by AWS request ID

I got this log message:我收到此日志消息:

com.amazonaws.services.s3.model.AmazonS3Exception: The specified key does not exist. com.amazonaws.services.s3.model.AmazonS3Exception:指定的密钥不存在。 (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: request_id ; S3 Extended Request ID: extended_request_id ) (服务:Amazon S3;状态代码:404;错误代码:NoSuchKey;请求 ID: request_id ;S3 扩展请求 ID: extended_request_id

Is it possible to get parameters for the request (in this case S3 key and bucket) by request_id and extended_request_id ?是否可以通过request_idextended_request_id获取请求参数(在本例中为 S3 密钥和存储桶)?

The Request ID is received on the wire as x-amz-request-id and is styled as the Request ID in the S3 access logs.请求 ID 在网络上作为x-amz-request-id接收,并在S3 访问日志中被设置为Request ID . .

This will not provide exhaustive information about the request parameters, depending on what you are trying to find, but it will show the bucket and key -- though you'll have to know which bucket's logs to look in, of course.这不会提供有关请求参数的详尽信息,具体取决于您要查找的内容,但它会显示存储桶和密钥——当然,您必须知道要查看哪个存储桶的日志。

More detailed information about the request can potentially found in CloudTrail logs .有关该请求的更多详细信息可能会在CloudTrail 日志中找到。 Object level requests are not captured by CloudTrail by default, so you'd need to enable this. CloudTrail 默认不捕获 Object 级请求,因此您需要启用它。 The request ID should appear in these logs as well.请求 ID 也应该出现在这些日志中。

The Extended Request ID, also called x-amz-id-2 is -- as far as I am aware -- only of use to AWS support when tracing things internally for you.据我所知,扩展请求 ID(也称为x-amz-id-2 )仅在为您进行内部跟踪时用于 AWS 支持。 Neither value is known to contain sensitive information.已知这两个值都不包含敏感信息。 The extended ID may be a large random number or may be encrypted, but if it is encrypted, there is no documented way to decrypt it.扩展 ID 可能是一个很大的随机数,也可能是加密的,但如果它是加密的,则没有文档化的解密方法。 The documentation calls it a "special token."该文档称其为“特殊令牌”。 A little bit more detail in the context of support is here . 此处提供了有关支持上下文的更多详细信息。

In summary, there is no short/simple "lookup" method but it is possible, as noted above.总之,如上所述,没有简短/简单的“查找”方法,但它是可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM