aws-lambdaserverless-framework

Maximum size for environment variable


What is the maximum size of an environment variable with Serverless Framework?

At some point (in 2019 based on issue tracking ticket) it has been 4 Kb and in a project I'm working with there was a workaround made because of this. Now this workaround is part of timeout issues faced, and I'm wondering whether this could be removed, i.e. if the limit has been increased.

I couldn't find the limit by searching docs and based on tribal knowledge the original issue came up when a developer tried to load big enough parameter.


Solution

  • 4kb for all environment variables is still the limit: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-environment-variable-size/