Dave
Dave

Reputation: 5416

Error: EntityTooLarge Status 400 AmazonAWS

I'm trying to upload a video from a Cordova app to an Amazon AWS S3 bucket from an Android/iPhone. But it's failing sometimes, giving sporadic reports of this error from AWS bucket:

http_status:400,
<Code>EntityTooLarge</Code>

Some of the files are tiny, some around 300mb or so.

What can I do to resolve this at the AWS end?

Upvotes: 1

Views: 2988

Answers (2)

Michael - sqlbot
Michael - sqlbot

Reputation: 179144

The 400 Bad Request error is sometimes used by S3 to indicate conditions that make the request in some sense invalid -- not just syntactically invalid, which is the traditional sense of 400 errors.

EntityTooLarge

Your proposed upload exceeds the maximum allowed object size.

400 Bad Request

http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

Note the word "proposed." This appears to be a reaction to the Content-Length request header you are sending. You may want to examine that. Perhaps the header is inconsistent with the actual size of the file, or the file is being detected as larger than it actually is.

Note that while the maximum object size in S3 is 5 TiB, the maximum upload size is 5 GiB. (Objects larger than 5 GiB have to be uploaded in multiple parts.)

Upvotes: 1

Amit
Amit

Reputation: 32386

413 errors occur when the request body is larger than the server is configured to allow. I believe its not the error which AWS S3 is throwing because they support 5 TB size of object.

If you are first accepting this video in your app and from there you are making request to amazon S3, then your server is not configure to accept the large entities in request.

Refer -set-entity-size for different servers. if your server is not listed here, then you need to figure out how to increase entity size for your server.

Upvotes: 0

Related Questions