In the documentation we have a description of lambda functions like the following:
exports.handler = async function(event, context) { // your server-side functionality }
The
context
parameter includes information about the context in which the function was called, like certain Identity user information, for example.
I would like to know more about the context
capability other than the Identity pupose.
Is this reserved only for Netlify internal usage/tools or can we use it on our side to add some capability?
Can we populate that context
for all or a set of our lambda functions with a prebuild plugin?
In our case we are looking to set constants retrieved from our content provider on build. This would allow us to avoid querying that content provider at every execution of lambdas and keep those constant up to date at every site build.