简体   繁体   中英

Get request parameters by AWS request ID

I got this log message:

com.amazonaws.services.s3.model.AmazonS3Exception: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: request_id ; S3 Extended Request 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 ?

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. .

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 . Object level requests are not captured by CloudTrail by default, so you'd need to enable this. The request ID should appear in these logs as well.

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. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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