Can I change the environment variables in a published version of my Lambda function?
I want to change the environment variables in a published version of my AWS Lambda function. Can I do that?
"I want to change the environment variables in a published version of my AWS Lambda function. Can I do that?Short descriptionYou can't change the configuration (which includes environment variables) or function code in a  published Lambda function version.To change the environment variables of a published Lambda function version, you must first change the current, unpublished function version ($LATEST). Then, publish a new function version.Note: Consider creating a Lambda alias to point to a function version that's configured with the environment variables that you want to use. Using aliases allows you to avoid hard-coding a specific function version into your app.ResolutionNote: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.Change the unpublished function versionTo change environment variables in the $LATEST version of your Lambda function, use one of the following:The Lambda console.The update-function-configuration command in the AWS CLI.Lambda API calls in the AWS SDKs.Publish a new function versionAfter changing environment variables in the $LATEST version, publish your updated Lambda function using the Lambda console or the PublishVersion API. For more information, see Managing Versions with the Lambda API.Related informationUpdateFunctionConfiguration (AWS Lambda Developer Guide API reference)Environment (AWS Lambda Developer Guide API reference)Follow"