I ran into this today - I defined an ENV variable in my site settings - wrote some code that used it - and when deployed, I got an error in my logs:
12:08:02 PM: Failed to create function: invalid parameter for function creation: Your environment variables exceed the 4KB limit imposed by AWS Lambda. Please consider reducing them.
This is totally fair, but it would really help if the UI would give some kind of warning. Or heck, just block it completely.