How to change runtime of auto-created dashboard Lambda?

When I add provider.logs entry to serverless.yaml, it crates Lambda CustomDashresourceDashapigwDashcwDashroleLambdaFunction whose name is like <servicename><hash>.

serverless.yaml:

provider:
  logs:
    restApi:
      accessLogging: true
      format: '{ "requestId":"$context.requestId" }'

Created Cloud Formation template:

		"CustomDashresourceDashapigwDashcwDashroleLambdaFunction": {
			"Type": "AWS::Lambda::Function",
			"Properties": {
				"Code": {
					"S3Bucket": {
						"Ref": "ServerlessDeploymentBucket"
					},
					"S3Key": "/<key_to>/custom-resources.zip"
				},
				"FunctionName": "<servicename><hash>",
				"Handler": "apiGatewayCloudWatchRole/handler.handler",
				"MemorySize": 1024,
				"Runtime": "nodejs12.x",
				"Timeout": 180,
				"Role": {
					"Fn::GetAtt": ["IamRoleCustomResourcesLambdaExecution", "Arn"]
				}
			},
			"DependsOn": ["IamRoleCustomResourcesLambdaExecution"]
		},

The runtime of this Lambda is nodejs12.x, and I want to change it to nodejs16.x or something, because AWS is going to stop supporting Node.js 12 on December 2022.
How will this be possible?

The runtime version is hard-coded here,

and is updated to use Node14 in Serverless Framework V3.

So upgrading framework to V3 will change runtime to node14.x

Finally, select Create . Modify Lambda function. Now that we have a Lambda function that will execute every time our Auto Scaling group changes