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?