I set a large environment variable (2KB), then I opened deploy preview, and it failed with the error
Invalid AWS Lambda parameters. Reserved keys used in this request.
When I removed the environment variable and retried the preview, it deployed successfully.
I’m pretty sure I just hit the 4KB limit on all env vars, but could the error message be changed to make that clear? Is there any way to find out exactly how long your env vars are before you deploy and get an error message?