Answer - B.
This is mentioned in the AWS Documentation.
Environment variables for Lambda functions enable you to dynamically pass settings to your function code and libraries without making changes to your code.
Environment variables are key-value pairs that you create and modify as part of your function configuration, using either the AWS Lambda Console, the AWS Lambda CLI or the AWS Lambda SDK.
AWS Lambda then makes these key-value pairs available to your Lambda function code using standard APIs supported by the language, like process.env for Node.js functions.
Option A is incorrect because there is no need to create a Lambda function for each environment and the question needs a common Lambda function to interact with different environments.
Option C is incorrect because different versions of Lambda function are not required.
Option D is incorrect because ALIAS is not the correct method to dynamically pass settings to a Lambda function.