lambci / docker-lambda

Docker images and test runners that replicate the live AWS Lambda environment
MIT License
5.84k stars 431 forks source link

Document the use of the env vars #324

Open zvictor opened 3 years ago

zvictor commented 3 years ago

What are the DOCKERLAMBDA* environment variables used for?

One would assume that e.g. DOCKER_LAMBDA_NO_MODIFY_LOGS would silent the Handler/layer file changed, restarting bootstrap... messages, but it doesn't. Not knowing what the flags are for makes it hard to know if they are actually working.

mhart commented 3 years ago

It's an advanced setting that affects the replacement of \r and \n in the output – due to Lambda's mangling of log output

zvictor commented 3 years ago

Is there a way to silent the Handler/layer file changed, restarting bootstrap... messages?

mhart commented 3 years ago

Not with a flag. Those messages are written to stderr, so you could redirect the output of stderr (ie 2>/dev/null)

zvictor commented 3 years ago

Is it safe to do so? Won't I get errors muted?

mhart commented 3 years ago

Errors will still be returned to your Lambda via the API, which I assume is how you're invoking your functions?