Deploying lambda conceiving sensitive variables using serverless
As far as I'm aware. There is no way to encrypt the environment variable value in the variables section of the lambda function. And to be fair, even if there was, it wouldn't provide any benefit in terms of keeping the variable secret. If the variable could be hidden/encrypted in the variables sections to be decrypted later, a user could simply execute the lambda function and print the results of the decrypted variable to stdout. 

One approach could be to use aws secrets manager to store and retrieve your secrets. You can then assign your lambda function a role to allow access to the secret store, and use AWS SDK to retrieve your value.