Free auditStart free
GuideError · CDN and hosting errors

CloudFront 400: Bad Request

Trace a CloudFront 400 to its cause: an S3 bucket in a different region, ALB header size limits or a malformed request. Includes a test that produces a real 400.

3 min
read
2
sources
Oct 31, 2026
updated
Scaplet Editorial Team
author
In one line

CloudFront returns 400 when the client sent invalid data, or when the origin rejected the request and CloudFront relayed it. AWS documents two origin cases: an S3 origin that moved regions, which returns an AuthorizationHeaderMalformed message, and an Application Load Balancer origin, which rejects oversized headers, malformed requests or an early disconnect.

30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
Invalid data in the request
Generic cause
16 KB per line or header, 64 KB total
ALB header limit
AuthorizationHeaderMalformed
S3 message
Re-save the origin
Fix for S3
01Documented causes by origin type

Who rejected the request

AWS says CloudFront returns a 400 when the client sends invalid data, such as missing or incorrect content in the payload or parameters, and that it can also be a generic client error. In practice the rejection often happens one hop further back, at the origin, and CloudFront passes it along. The response headers show which.
Origin

Amazon S3

Cause AWS lists
Bucket was deleted and recreated with the same name in a different AWS Region; the response mentions the authorization header and the region
Where to look
The distribution's origin settings
Origin

Application Load Balancer

Cause AWS lists
Malformed request that does not meet the HTTP specification
Where to look
The client or proxy building the request
Origin

Application Load Balancer

Cause AWS lists
Request header over 16 KB per request line, 16 KB per single header, or 64 KB for the entire header
Where to look
Cookies and custom headers
Origin

Application Load Balancer

Cause AWS lists
Client closed the connection before sending the full request body
Where to look
Client timeouts, uploads
Request path with the two documented origin rejections
viewer ---> CloudFront edge ---> origin
                 |                 |
                 |                 |-- S3: bucket moved to another region
                 |                 |       "The authorization header is malformed; the region ..."
                 |                 |-- ALB: header too large, malformed request,
                 |                         client closed before the full body
                 |-- 400 relayed to the viewer
02Check it

Make a real CloudFront 400 in one command

A header over the ALB limit is easy to reproduce against any site that sits on CloudFront with an ALB origin. The command below sends one 20,000 character header to aws.amazon.com. It returned a 400 from this session's network, with a body served by awselb/2.0 and x-cache: Error from cloudfront. That combination points to an ALB origin rejection relayed by CloudFront rather than an edge rejection, though only the site's owner can confirm its setup.
Public endpoint: a plain 400 for comparison
curl -sS -o /dev/null -w "%{http_code}\n" https://httpbin.org/status/400
# expected output: 400

For your own distribution, run the first command against your CloudFront domain. Treat a 400 whose server header names your origin as an origin decision. Trimming cookies and custom headers is the usual remedy, and the limit applies to the whole request header, so many small cookies add up.

Public endpoint: oversized header produces a CloudFront-relayed 400
curl -sI -H "X-Pad: $(head -c 20000 /dev/zero | tr '\0' a)" https://aws.amazon.com | head -8
# observed: HTTP/2 400, server: awselb/2.0, x-cache: Error from cloudfront, via: ... (CloudFront)
03How it works

Fix the S3 region mismatch

AWS gives the error text as: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2'. It appears when the distribution still points to the bucket's old region after the bucket was recreated elsewhere. After the fix you should stop receiving AuthorizationHeaderMalformed responses.
  1. 1

    Open the distribution

    In the CloudFront console choose the distribution that produces the error.

  2. 2

    Edit the origin

    Choose Origins and Origin Groups, select the check box for the S3 origin that moved, then choose Edit.

  3. 3

    Save without changes

    Choose Yes, Edit. AWS says you do not need to change any settings first.

  4. 4

    Wait for the deployment

    CloudFront redeploys the distribution. The Last modified column shows Deploying until it finishes, and the errors stop some time after that.

Reader's own account: confirm which region the bucket lives in now
aws s3api get-bucket-location --bucket your-bucket-name
04Explained

Search impact

Google says 4xx status codes other than 429 have no effect on crawl rate, but URLs already indexed that return one are removed from the index. A 400 on a template or asset path is therefore worth catching early. Compare with CloudFront 404 and CloudFront 403, which are the other client-side codes on the same service, and read 4xx errors for how to list affected URLs.
Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • amazon.com
  • google.com
  1. 01Amazon CloudFront docs: HTTP 400 status code (Bad Request)docs.aws.amazon.com · checked 2026-11-01
  2. 02How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-11-01
Questions

Asked a lot.

3 questions people ask next, answered from the sources on this page.

01What does CloudFront 400 Bad Request mean?

The request contained invalid data, such as missing or incorrect content in the payload or parameters, or it is a generic client error. CloudFront also relays 400s from origins like S3 and Application Load Balancers.

02What is the ALB request header size limit?

AWS lists three limits for requests to an ALB origin: 16 KB per request line, 16 KB per single header, and 64 KB for the entire request header.

03Why does CloudFront say the authorization header is malformed?

An S3 origin was deleted and recreated in a different region under the same name, and the distribution still expects the old region. Re-save the origin in the distribution to update it.

Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane