Billing for Amazon S3 error responses - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Billing for Amazon S3 error responses

Important

On May 13, 2024, we started deploying a change to eliminate charges for unauthorized requests that aren't initiated by the bucket owner. After the deployment of this change is completed, bucket owners will never incur request or bandwidth charges for requests that return AccessDenied (HTTP 403 Forbidden) errors when these requests are initiated from outside of their individual Amazon account or Amazon organization. The current page shows a full list of HTTP 3XX and 4XX status codes that won't be billed. This billing change requires no updates to your applications and applies to all S3 buckets. When deployment of this change is completed in all Amazon Web Services Regions, we’ll update our documentation.

In general, S3 bucket owners are billed for requests with HTTP 200 OK successful responses and HTTP 4XX client error responses. Bucket owners aren't billed for HTTP 5XX server error responses, such as HTTP 503 Slow Down errors. For more information about billing charges if your bucket is configured as a Requester Pays bucket, see How Requester Pays charges work.

The following table lists specific error codes under HTTP 3XX and 4XX status codes that aren't billed. For buckets configured with website hosting, applicable request and other charges will still apply when S3 returns a custom error document or for custom redirects.

Note

For AccessDenied (HTTP 403 Forbidden), S3 doesn't charge the bucket owner when the request is initiated outside of the bucket owner's individual Amazon account or the bucket owner's Amazon organization.

HTTP status code Error code Description of error code
301 Moved Permanently PermanentRedirect The bucket that you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint.
PermanentRedirectControlError The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint.
307 Temporary Redirect TemporaryRedirect You are being redirected to the bucket while the Domain Name System (DNS) server is being updated.
400 Bad Request AuthorizationHeaderMalformed The authorization header that you provided is not valid.
AuthorizationQueryParametersError The authorization query parameters that you provided are not valid.
ExpiredToken The provided token has expired.
IllegalLocationConstraintException You are trying to access a bucket from a different Region than where the bucket exists. To avoid this error, use the --region option. For example: aws s3 cp awsexample.txt s3://DOC-EXAMPLE-BUCKET/ --region ap-east-1.
InvalidArgument

This error might occur for the following reasons:

  • The specified argument was not valid.

  • The request was missing a required header.

  • The specified argument was incomplete or in the wrong format.

  • The specified argument must have a length greater than or equal to 3.

InvalidDigest The Content-MD5 or checksum value that you specified is not valid.
InvalidEncryptionAlgorithmError The encryption request that you specified is not valid. The valid value is AES256.
InvalidRequest

This error might occur for the following reasons:

  • The request is using the wrong signature version. Use AWS4-HMAC-SHA256 (Signature Version 4).

  • An access point can be created only for an existing bucket.

  • The access point is not in a state where it can be deleted.

  • An access point can be listed only for an existing bucket.

  • The next token is not valid.

  • At least one action must be specified in a lifecycle rule.

  • At least one lifecycle rule must be specified.

  • The number of lifecycle rules must not exceed the allowed limit of 1000 rules.

  • The range for the MaxResults parameter is not valid.

  • SOAP requests must be made over an HTTPS connection.

  • Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names.

  • Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names.

  • The Amazon S3 Transfer Acceleration endpoint supports only virtual style requests.

  • Amazon S3 Transfer Acceleration is not configured on this bucket.

  • Amazon S3 Transfer Acceleration is disabled on this bucket.

  • Amazon S3 Transfer Acceleration is not supported on this bucket. For assistance, contact Amazon Web Services Support.

  • Amazon S3 Transfer Acceleration cannot be enabled on this bucket. For assistance, contact Amazon Web Services Support.

  • Conflicting values provided in HTTP headers and query parameters.

  • Conflicting values provided in HTTP headers and POST form fields.

  • CopyObject request made on objects larger than 5GB in size.

InvalidSOAPRequest The SOAP request body is not valid.
InvalidStorageClass The storage class that you specified is not valid.
InvalidTag Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags.
InvalidToken The provided token is malformed or otherwise not valid.
InvalidURI The specified URI couldn't be parsed.
KeyTooLongError Your key is too long.
MalformedACLError The ACL that you provided was not well formed or did not validate against our published schema.
MalformedPOSTRequest The body of your POST request is not well-formed multipart/form-data.
MalformedXML The XML that you provided was not well formed or did not validate against our published schema.
MaxPostPreDataLengthExceededError Your POST request fields preceding the upload file were too large.
MetadataTooLarge Your metadata headers exceed the maximum allowed metadata size.
MissingRequestBodyError You sent an empty XML document as a request.
MissingSecurityHeader Your request is missing a required header.
NoLoggingStatusForKey There is no such thing as a logging status subresource for a key.
RequestHeaderSectionTooLarge The request header and query parameters used to make the request exceed the maximum allowed sizes
UnexpectedContent This request contains unsupported content.
UserKeyMustBeSpecified The bucket POST request must contain the specified field name. If it is specified, check the order of the fields.
IncorrectEndpoint The specified bucket exists in another Region. Direct requests to the correct endpoint.
403 Forbidden RequestTimeTooSkewed The difference between the request time and the server's time is too large.
SignatureDoesNotMatch The request signature that the server calculated does not match the signature that you provided. Check your Amazon secret access key and signing method. For more information, see REST Authentication and SOAP Authentication.
NotSignedUp Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: http://www.amazonaws.cn/s3
InvalidSecurity The provided security credentials are not valid.
InvalidPayer All access to this object has been disabled. For further assistance, see Contact Us.
InvalidAccessKeyId The Amazon access key ID that you provided does not exist in our records.
AccountProblem There is a problem with your Amazon Web Services account that prevents the operation from completing successfully. For further assistance, see Contact Us.
UnauthorizedAccessError Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal.
404 Not Found NoSuchUpload The specified multipart upload does not exist. The upload ID might not be valid, or the multipart upload might have been aborted or completed.
NoSuchWebsiteConfiguration The specified bucket does not have a website configuration.
405 Method Not Allowed MethodNotAllowed The specified method is not allowed against this resource.
409 Conflict BucketAlreadyExists The requested bucket name is not available. The bucket namespace is shared by all users of the system. Specify a different name and try again.
InvalidBucketState The request is not valid for the current state of the bucket.
OperationAborted A conflicting conditional operation is currently in progress against this resource. Try again.
411 Length Required MissingContentLength You must provide the Content-Length HTTP header.
412 Precondition Failed RequestIsNotMultiPartContent A bucket POST request must be of the enclosure-type multipart/form-data.