I am working on an AWS CloudFormation template that includes a Lambda function with sensitive environment variables. I'd like to set up a KMS key and encrypt them with it, which is easy to do in the console but proving very difficult to do in CloudFormation.
Can anyone please post a basic CloudFormation JSON object for a Lambda with at least one environment variable that is encrypted using a KMS key, as well as the JSON for creating that key?