Skip to content

Why do I get a 200 response with "InternalError" or "SlowDown" for copy requests to my Amazon S3 bucket?

2 minute read
0

I want to perform a copy operation on my Amazon Simple Storage Service (Amazon S3) bucket. The request returns HTTP 200 OK, but the response includes "InternalError" or "SlowDown".

Short description

For the Amazon S3 CopyObject or CompleteMultipartUpload operations, HTTP 200 OK doesn't confirm success by itself. The request is successful only after the client receives and processes the full response body and confirms that the response doesn't contain an embedded error.  

If the request fails, then the error message is similar to the following example: 

"AmazonS3Exception: We encountered an internal error. Please try again. (Service: Amazon S3; Status Code: 200; Error Code: InternalError; Request ID: 0EXAMPLE9AAEB265)" 

Resolution

To detect and respond to HTTP 200 errors, take the following actions. 

Read and parse the entire response body to confirm success

Treat the operation as successful only when the full response body confirms success. If the response body contains "InternalError" or "SlowDown", then handle the request as failed even when the HTTP status code is 200 OK.

Keep the connection open until the full response is received and processed 

Don’t stop reading after you receive the 200 OK header. Read and process the entire response so your client can detect an embedded error and record the returned request identifiers. 

Use an AWS SDK or the AWS Command Line Interface (AWS CLI) for copy workflows when possible 

Use an AWS SDK or the AWS CLI instead of raw HTTP handling. AWS SDKs detect embedded errors in 200 OK responses and apply error handling based on your SDK configuration. To handle errors, configure retries for retryable failures.

Retry transient failures 

For requests that return a transient "InternalError", use exponential backoff with jitter and set a maximum retry limit. AWS SDKs in standard and adaptive mode implement exponential backoff with jitter for retryable errors.

Reduce request rate for "SlowDown", then retry 

If the response contains "SlowDown", then reduce your request rate and concurrency before you retry. Increase request rates gradually after errors stop.  

Related information

How do I troubleshoot an HTTP 500 or 503 error from Amazon S3?

AWS OFFICIALUpdated a month ago