Feedback on Environment variables

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.

Ah, it appears to be the total of my env variables. Still, the UI could really help out here and flag it.

1 Like

The limit is only for variables used in Functions. So you could use more than 4 KB of variables in builds, for example.

Good to know, thanks!