-
It does not seem like I have my s3 client configured this way -
When I run my application, I can see HTTP responses being logged -
However, all HTTP responses are not being logged. For example, the application logs a few of these errors which are logged after the operation response is received from the S3 API -
However, it seems like
How can I accurately log all HTTP requests and responses made by the S3 APIs? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @anishsana , A Also, the connection reset error can happen for variety of reasons and would not always be related to a 500 or any error. In a concurrent environment the server can respond with successful code, but because of the connection management on the server side, it might close idle connections which can cause these (sometime successful) responses to never make it over the wire. The correct strategy to handle failed requests caused by connection reset errors is to retry them, which the SDK should do by default. Thanks, |
Beta Was this translation helpful? Give feedback.
-
https://aws.github.io/aws-sdk-go-v2/docs/making-requests/#responses-with-ioreadcloser
In an operation like GetObject, where the entire HTTP response body is the userdata (the object, in this case), we just pass the underlying This is different from |
Beta Was this translation helpful? Give feedback.
https://aws.github.io/aws-sdk-go-v2/docs/making-requests/#responses-with-ioreadcloser
In an operation like GetObject, where the entire HTTP response body is the userdata (the object, in this case), we just pass the underlying
http.Response.Body
to you. So you're probably gettingconnection reset
in the context of actuallyRead
ing the response body yourself - the SDK isn't going to retry that, you're not inside an SDK operation call (there's no retry loop to begin with).This is different from
PutObject
, wherein the SDK is taking object data from you and handling conveying it over the wir…