# 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.

Canonical: https://scaplet.com/errors/cdn/cloudfront-400

Guide Error · CDN and hosting errors

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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fcloudfront-400%20(%22CloudFront%20400%3A%20Bad%20Request%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fcloudfront-400%20(%22CloudFront%20400%3A%20Bad%20Request%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fcloudfront-400%20(%22CloudFront%20400%3A%20Bad%20Request%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fcloudfront-400%20(%22CloudFront%20400%3A%20Bad%20Request%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## 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

_01_Documented 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
```

_02_Check 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)
```

_03_How 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
```

_04_Explained

## 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](/errors/cdn/cloudfront-404) and [CloudFront 403](/errors/http/403/cloudfront), which are the other client-side codes on the same service, and read [4xx errors](/seo-issues/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. 01 [Amazon CloudFront docs: HTTP 400 status code (Bad Request)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-400-bad-request.html) docs.aws.amazon.com · checked 2026-11-01
2. 02 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-11-01

Questions

## Asked a lot.

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

_01_ What 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.

_02_ What 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.

_03_ Why 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.

## Keep learning

[All errors](/errors)

[Learn CloudFront 503: Service Unavailable CDN and hosting errors](/errors/cdn/cloudfront-503) [Related 4xx errors Status codes and links](/seo-issues/4xx-errors) [Read next CloudFront 404 Not Found CDN and hosting errors](/errors/cdn/cloudfront-404) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 400 errors
[400 Bad Request in Flask](/errors/http/400/flask) [400 Bad Request in nginx](/errors/http/400/nginx) [400 Bad Request in Spring Boot](/errors/http/400/spring-boot) [HTTP 400 Bad Request](/errors/http/400) [400 Bad Request in Apache httpd](/errors/http/400/apache)

More Cloudfront errors
[CloudFront 404 Not Found](/errors/cdn/cloudfront-404) [CloudFront 503: Service Unavailable](/errors/cdn/cloudfront-503)

More in CDN and hosting errors
[API Gateway 504 Gateway Timeout](/errors/cdn/api-gateway-504) [AWS 502 Bad Gateway](/errors/cdn/aws-502-bad-gateway) [AWS Amplify 404 Not Found](/errors/cdn/amplify-404) [AWS EC2: Connection timed out](/errors/cdn/aws-ec2-connection-timed-out) [AWS Lambda 502 Bad Gateway](/errors/cdn/aws-lambda-502) [AWS Lambda timeout](/errors/cdn/lambda-timeout) [Azure Front Door 502](/errors/cdn/azure-front-door-502) [Cloud Run 503 error](/errors/cdn/cloud-run-503) [Cloudflare 504 Gateway Timeout](/errors/cdn/cloudflare-504) [Cloudflare Pages 404 Not Found](/errors/cdn/cloudflare-pages-404) [Cloudflare too many redirects (ERR_TOO_MANY_REDIRECTS)](/errors/cdn/cloudflare-too-many-redirects) [Cloudflare verify you are human loop](/errors/cdn/cloudflare-verify-you-are-human-loop) [CloudFront 400: Bad Request](/errors/cdn/cloudfront-400) [CloudFront 404 Not Found](/errors/cdn/cloudfront-404) [CloudFront 503: Service Unavailable](/errors/cdn/cloudfront-503) [Firebase Hosting 404](/errors/cdn/firebase-hosting-404) [GitHub Pages 404 Not Found](/errors/cdn/github-pages-404) [Google Cloud 502 Bad Gateway](/errors/cdn/google-cloud-502) [Heroku 503 Service Unavailable](/errors/cdn/heroku-503) [Heroku H10: App crashed](/errors/cdn/heroku-h10-app-crashed) [Heroku H12: Request timeout](/errors/cdn/heroku-h12-request-timeout) [Heroku H13: Connection closed without response](/errors/cdn/heroku-h13) [Heroku H14: No web processes running](/errors/cdn/heroku-h14) [Netlify build failed](/errors/cdn/netlify-build-failed)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

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

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
