When using the AWS CLI lambda invoke, is there a way to pass environment variables?

Viewed 718

Say an AWS Lambda is invoked using the AWS CLI, is there any way to pass different values for environment variables for an invocation?

I see that the context can be passed, but I don't see the environment.

I can't seem to find a way

1 Answers

No, you can't override Lambda environment variables at invocation time. You would have to pass the values in as context or payload, and then code your Lambda function to check for those values.

Related