Skip to content
Console

Error codes and troubleshooting

When a request fails, S4 returns an HTTP status code and an XML error message. Look up the meaning and the fix by Code in the tables below.

Error response

<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>AccessDenied</Code>
  <Message>Access Denied.</Message>
  <RequestId>1795515998868996309</RequestId>
  <Key>x.txt</Key>
  <HostID>Ed6IhpST4VqRFmgv3eFI...</HostID>
</Error>
FieldDescription
CodeThe error code. Programs should decide based on it and the HTTP status code
MessageAn English description that may change; do not use it for decisions
RequestIdThe request ID, identical to the x-amz-request-id response header
KeyThe requested object key
HostIDUsed by support to locate the request; include it when you contact us
  • Every response (including successful ones) carries x-amz-request-id. When you contact support, provide it along with the request time and the full error message.
  • HEAD requests have no response body, so only the status code is available.
  • The 304 and 412 responses to conditional reads have no response body.
  • When accessed as a website through a bound domain or a CDN, 403 and 404 return an HTML page instead of XML.

Authentication and signatures

StatusCodeMeaningWhat to do
403InvalidAccessKeyIdThe AccessKey does not existCheck for typos, check whether it was deleted, and check that the endpoint is https://s3.bitiful.net
403SignatureDoesNotMatchThe signature does not matchSee the checklist
403RequestTimeTooSkewedThe request time is more than 15 minutes earlier than the server timeCorrect the local clock
403AccessDenied(Request is not valid yet)The request time is more than 15 minutes later than the server timeCorrect the local clock
403AccessDenied(Request has expired)The presigned link has expiredGenerate a new one
403AccessDenied(There were headers present in the request which were not signed)The request carries an unsigned x-amz-* headerAdd the header to the signature, or remove it
400AuthorizationQueryParametersErrorA presigned parameter is missing or malformed, or the validity period exceeds 604800 secondsFix the parameters as described
400MissingFields、InvalidArgumentThe Authorization header is malformedSign with an SDK, or check the format of your hand-written signature
400InvalidRequestThe signing method is not supported, or the service name in the credential scope is not s3Use V4 signing
400XAmzContentSHA256MismatchThe SHA-256 of the content does not match x-amz-content-sha256, or its value is inconsistentSign with an SDK, or check the digest in a hand-written signature; don't change the content after signing

Permissions and access restrictions

StatusCodeMeaningWhat to do
403AccessDeniedNo permission, or denied by an access control listSee the checklist
403BucketHasBeenBannedThe bucket is suspended. The cause may be an overdue balance or a ban for violationsFirst check your account balance. If the balance is overdue, top up; service resumes automatically once the balance is positive. If the balance is not overdue, contact support
403OriginalFileProtectedOriginal file protection is on, so anonymous access to the original file is deniedAccess through a Style, or use a presigned link. See Original file protection
403FileTypeForbidden.apk and .ipa files cannot be downloaded directly from S4Use a CDN
403ReachTheMaxRequestsThe presigned link exceeded its x-bitiful-max-requests countGenerate a new link. See Presigned URLs

Buckets

StatusCodeMeaningWhat to do
404NoSuchBucketThe bucket does not existCheck the bucket name. Without permission, a nonexistent bucket also returns 403
409BucketAlreadyExistsThe bucket name is already used by someone elsePick another name; bucket names are globally unique
409BucketAlreadyOwnedByYouThe bucket already belongs to youYou can use it directly
409BadBucketName、BucketNameTooShort、BucketNameTooLongThe bucket name is invalidSee the naming rules
400TooManyBucketsThe number of buckets exceeds the quotaSee Limits
409BucketNotEmptyThe bucket is not emptyEmpty it before deleting
400CORSTooManyRules、CORSRuleTooManyDomains、CORSNoRule、CORSDuplicateIDThe CORS rules are invalidUp to 10 rules, each with up to 10 origins; at least one rule; rule IDs must be unique

Objects and uploads

StatusCodeMeaningWhat to do
404NoSuchKeyThe object does not exist, or the target of a conditional write does not existCheck the case, directory, and URL encoding of the object key
400KeyTooLongErrorThe object key exceeds 1024 bytesShorten the key. Non-ASCII characters count as their UTF-8 byte length
400Invalid URIThe object key contains non-printable characters, or has a path segment that is entirely . or ..Rename it. See Object key rules
400InvalidDigestThe Content-MD5 format is invalid. It is also returned when Cache-Control cannot be parsedCheck these two headers
400BadDigestThe content does not match Content-MD5 or the checksumThe network or your program altered the content; upload again
400MalformedDateThe date format is invalid, for example in the Expires headerUse the HTTP date format
400EntityTooLargeThe size limit is exceededSee Limits
400EntityTooSmallA part is smaller than 5 MiB (except the last part), or a form upload is smaller than the required sizeIncrease the part size
404NoSuchUploadThe multipart upload does not exist, has completed or been aborted, or uploadId does not match the object keyCreate a new multipart upload
400InvalidPartA part does not exist, an ETag does not match, or all parts are emptyCheck with ListParts, then retry
400InvalidArgumentAn invalid argument. Common causes: the copy source does not exist, a batch delete has more than 1000 keys, a part number is out of range, or a media processing parameter is invalidRead the Message
400MalformedXMLThe request body XML is invalidCheck the XML
400InvalidTagA tag is invalidUp to 10 tags; keys up to 128, values up to 256
400InvalidCopyDest、InvalidCopyTypeCopying onto itself without changing metadata, or the source or destination is a directoryChange the parameters
400InvalidMoveDest、InvalidMoveTypeThe move destination is invalid, or the source or destination is a directoryChange the parameters
409ExistingObjectIsFileA file with the same name already exists at the destination or in a parent pathA file and a directory cannot share a name
409ExistingObjectIsDirectoryA directory with the same name already exists at the destinationA file and a directory cannot share a name
409OperationAbortedConflicts with a concurrent writeWait and retry
412PreconditionFailedThe condition does not holdSee Conditional requests
400PostPolicyInvalidKeyName、MalformedPOSTRequestThe policy or form format of a form upload is invalidCheck the form fields
499ClientCanceledThe client disconnected or stopped sendingCheck client timeouts and the network

Media processing and mirror back-to-origin

StatusCodeMeaningWhat to do
403TooLargeForCoreIXThe original file exceeds 200 MiB (video and frame extraction excepted)Compress the original file first
415UnsupportedMediaType、UnSupportedTypeThe file type cannot be processed, or processing was requested on a directorySee Supported formats
400InvalidArgumentA processing parameter is invalidRead the Message and check the CoreIX parameters
424MirrorFailedThe mirror origin did not return 200, 206, or 404Check the origin and the mirror back-to-origin settings
202MirrorFetchingThe object is being fetched from the origin and is temporarily unavailableRetry later

Rate limiting and server errors

StatusCodeMeaningWhat to do
429TooManyRequestToo many concurrent requestsLower the concurrency and retry with exponential backoff
500InternalErrorServer errorRetry with backoff. For write requests, confirm the result before retrying
502BadGatewayThe backend is temporarily unreachableRetry with backoff
503ServiceUnavailableThe service is temporarily unavailableRetry with backoff
501NotImplementedThe feature is not implemented, for example a delimiter other than / in a listingSee S3 API compatibility
405MethodNotAllowedThe request method does not match the pathCheck the method and the URL

S4 rate limiting returns 429 TooManyRequest, not AWS's 503 SlowDown. Some SDKs do not retry this error code automatically, so handle 429 in your program.

SignatureDoesNotMatch checklist

Check in order:

  1. Keys. Check whether the SecretKey has extra spaces or line breaks copied with it, and whether it pairs with the AccessKey.
  2. Method. The method of a presigned link must match the request method. A link generated for GET works only for GET and HEAD.
  3. The URL was modified. You cannot add or remove parameters after signing, including tracking parameters, CoreIX parameters, and x-amz-limit-rate.
  4. The URL was escaped. When a link is written into HTML or logs, & may become &amp; and %2F may become %252F.
  5. Content-Type. If content-type was signed when the upload link was generated, the upload must match it exactly. Browsers may add charset automatically.
  6. Host. A reverse proxy must not rewrite the Host header. Have the client access the bucket domain directly.
  7. Headers rewritten by a proxy. If a proxy modifies a header that is part of the signature (for example Accept-Encoding), the signature becomes invalid.
  8. Object key encoding. When signing by hand, encode spaces as %20 instead of +, and encode Chinese characters as UTF-8.
  9. Signature version. Use V4, set the Region to cn-east-1, and use s3 as the service name.
  10. SDK too old. Upgrade to a recent version, or follow the configuration in the examples for each language.

AccessDenied checklist

Signed requests

  1. Check whether the sub-user has the matching permission on this bucket or directory. A new sub-user has no permissions by default; see Sub-user permissions.
  2. Check whether the directory grant covers this object key.
  3. Listing requires list permission, and reading or writing files requires read or write permission; they are separate.
  4. Copying requires read permission on the source and write permission on the destination. Moving also requires write permission on the source.
  5. Writes with conditions such as If-Match also require read permission.
  6. You cannot create or delete buckets with a sub-user AccessKey.
  7. The object that the watermark image mark points to also needs read permission.

Anonymous access

  1. Check whether the bucket or directory is set to public read.
  2. Check whether the request was denied by the IP, Referer, or Headers lists in access control. A list denial has no dedicated error code; it is also AccessDenied.
  3. Anonymous access to a nonexistent object also returns 403 when there is no public read; it does not return 404.

Retry recommendations

Can retryDo not retry as is
429, 500, 502, 503, and 409 OperationAbortedOther 4XX
Network timeout, connection reset412

Retry with exponential backoff plus random jitter, for example 0.5 seconds, 1 second, 2 seconds, up to 5 times. Mainstream SDKs have this built in, so you usually only need to add 429.