This directive specifies which Lambda runtime AWS should use. This setting is used to set the Runtime property for the AWS::Serverless::Lambda resources in the serverless.template file. The default value is:
ProjectOptions:
LambdaProjects:
Runtime: netcoreapp3.1
The serverless.template SAM file AWS::Serverless::Function resource definition is updated based on the RunTime specified.
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Resources:
Pet:
Type: AWS::Serverless::Function
Properties:
FunctionName:
Fn::Sub: ${AWS::StackName}-Pet
CodeUri: Lambdas/Pet/bin/Release/netcoreapp3.1
Handler: Pet::LambdaFunc.LambdaEntryPoint::FunctionHandlerAsync
Description: Pet
Runtime: dotnet6
MemorySize: 128
Timeout: 30
Tracing: Active