Is there a way to specify the CloudWatch log group that an AWS lambda logs to? It seems to be generated directly from the lambda name; however, it would be especially conve
Creating the log group as mentioned as one of the answers works. To keep the retention policy after the stack is deleted, just add a DeletionPolicy.
"MyLambdaFunctionLogGroup": {
"Type": "AWS::Logs::LogGroup",
"DependsOn": "MyLambdaFunction",
"DeletionPolicy": "Retain",
"Properties": {
"LogGroupName": {"Fn::Join": ["", ["/aws/lambda/", {"Ref": "MyLambdaFunction"}]]},
"RetentionInDays": 14
}
}