Download 6 MB PDF file for testing

Open the single page and check document-upload behavior. The preset is 6 MiB (6,291,456 bytes); choose MB for decimal megabytes.

6,291,456 bytes · built in your browser, nothing uploaded
6,291,456 bytes
6 MiB · PDF · 772 B
Exact size

1 MB = 1,000,000 B · 1 MiB = 1,048,576 B

Advanced: test an upload limit

Enter the byte limit above, then choose one byte below, the exact limit or one byte above. Each choice uses the same base: 6,291,456 B. Generate and download each file to test your endpoint.

Where a 6 MB PDF comes up

  • Proving that large documents should go to S3 via a presigned URL rather than through a Lambda request body.
  • Testing error handling when an API Gateway + Lambda upload endpoint receives a document it cannot accept.
  • Checking mobile apps that compress or warn about attachments above roughly 5 MB.

Limits it lands on

  • AWS Lambda allows 6 MB for a synchronous request payload. This file is at that size before any encoding, and over it once base64 is applied.
  • It is still below the 10 MB maximum payload of an API Gateway REST API, so the failure happens at Lambda, not at the gateway.

What is inside the file

A 6,290,736-byte unreferenced stream follows the page objects; the cross-reference table at the end stays under 200 bytes.

There is no compression in the file, so the size you download is the size every hop sees.

Questions

Where exactly does the request fail?

API Gateway forwards it (it is under 10 MB), then Lambda refuses the invocation because the encoded payload exceeds 6 MB.

What is the usual fix?

Upload straight to S3 with a presigned URL and pass only the object key to the function.

Reference and checks

Format reference: PDF 32000-1.

Preset target: 6 MiB (6,291,456 bytes). Verify the downloaded file's byte count.

Generate another size in this format · Technical notes for every format · Guide to testing file upload limits · Data processing and privacy

Related tools: Merge PDF · Compress PDF.

Noticed an issue with this test file? Report an issue →