AWS API Gateway's Hard 10MB Upload Limit and the Presigned URL Fix
_jaydeepkarale · x · 2026-09-24
The Problem
- AWS API Gateway enforces a hard 10MB payload cap on both REST and HTTP APIs — no setting can raise it. Oversized requests are rejected before reaching your code.
- Lambda's synchronous invocation cap is 6MB, and binary bodies routed through the gateway ride as base64, inflating size by 1.33x. The practical ceiling for gateway-routed binary uploads is only 4-7MB.
Anti-patterns
- Trying to change account settings (impossible) or pushing files through Lambda, which hits both caps plus base64 bloat.
The Fix
- Presigned S3 URLs: the gateway only handles authorization and metadata; clients upload directly to S3. For truly large files, use S3 multipart upload or a managed upload service.
- This is also the cheaper and faster architecture — let the gateway serve JSON, keep files out of the request path.
More from coding & agent
- Sentry founder: agent code is the worst thing AI models can generate — zeeg · 2026-09-24
- Sentry CEO: agents built by agents are the worst code models generate — zeeg · 2026-09-24
- GitHub partners with Muse to review PRs, issues and notifications without switching tabs — unixterminal · 2026-09-24
- Dev take: the most fun projects are ones where code details don't matter — kieranklaassen · 2026-09-24
- simonw talks to his blog's Datasette via MCP using ChatGPT Voice on iPhone — reach_vb · 2026-09-24
- Designer builds a tarot app in 2 hours with Figma, Claude and Midjourney — AlexisDC · 2026-09-24